Newspublisher rich text editor cant get it to work

trying to get richtext to work with newspublisher

but i only get a blank page when I enable &initrte=1

nothing in error log

any advise?

permissions are default NewsPublisherPolicyTemplate permissions

&captions=content:Enter Post,introtext:Summary

Do you have the extra TinyMCE Rich Text Editor installed on your system?

When I test your code, I get a fatal error when the extra TinyMCE Rich Text Editor is installed.
But everything looks ok, if I uninstall the extra TinyMCE Rich Text Editor.

The problem seems to be this line in the code:

As the comment above this line states, that it’s “probably unnecessary” to invoke the event, it’s probably ok to just comment out the line.

yes tinymce is installed but it seems to pull it from cde line 818

I did try uncomment it but no luck

Yes Newspublisher loads its own version of the TinyMCE JS library, but when the extra “TinyMCE Rich Text Editor” is installed and Newspublisher invokes the event OnRichTextEditorInit then I get the following error.

Fatal error: Uncaught Error: Call to a member function addJavascript() on null in .../core/components/tinymcerte/src/Plugins/Events/OnRichTextEditorInit.php:53

So if commenting out $this->modx->invokeEvent('OnRichTextEditorInit', $fields); doesn’t work, then maybe check the server error log (not the error log from MODX) to see if there gets another error logged.

thanks let me try that and whaever else I can try also battling with the file manager to upload files, the rest works well though

I also tried on a standard stock install
still cant get it to work just blank screen

only error I get in both installs are

[2023-08-10 15:37:31] (ERROR @ /…/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 666) Could not load class: modAction from mysql.modaction
[2023-08-10 15:37:31] (ERROR @ /…/core/vendor/xpdo/xpdo/src/xPDO/xPDO.php : 786) modAction::load() is not a valid static method.

maybe its my server or db?

does this work with someone else, RTE on newspublisher?

What versions of MODX, PHP and Newspublisher are you using?

This has to be from another extra (that probably is not compatible with MODX 3).
The current version of Newspublisher doesn’t use modAction.

Did you check the server error log for fatal errors?

When I test it with MODX 3.0.3-pl and Newpublisher 3.1.5-pl, it works.

thanks so much for your reply

I jsut managed to find the issue

I am runnign php8.2

if I have

if installed and selected as editor for the manager under System Settings → Editor the newspublisher does not work on front end…
if they are not installed or not selected as editor in “System Settings → Editor” it works in the frontend

would this be a bug?

Yes, but isn’t this what I already wrote in my first answer.

yes it is but i only figured it out now lol many thanks for your hlep

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.