Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error when rich text editor is used #61

Open
halftrainedharry opened this issue Aug 15, 2023 · 0 comments
Open

Fatal error when rich text editor is used #61

halftrainedharry opened this issue Aug 15, 2023 · 0 comments

Comments

@halftrainedharry
Copy link

When the rich text editor is used for NewsPublisher (in the frontend)

[[!NewsPublisher?
    &initrte=`1`
    &rtcontent=`1`
    ...
]]

and a rich text editor extra (like for example "TinyMCE Rich Text Editor") is installed in the backend, a fatal error occurs:

Fatal error: Uncaught Error: Call to a member function addJavascript() on null in ...\core\components\tinymcerte\src\Plugins\Events\OnRichTextEditorInit.php:53 Stack trace: 
#0 ...\core\components\tinymcerte\src\Plugins\Events\OnRichTextEditorInit.php(41): TinyMCERTE\Plugins\Events\OnRichTextEditorInit->initTinyMCE() 
#1 ...\core\components\tinymcerte\src\Plugins\Plugin.php(50): TinyMCERTE\Plugins\Events\OnRichTextEditorInit->process() 
#2 ...\core\cache\includes\elements\modx\revolution\modplugin\22.include.cache.php(24): TinyMCERTE\Plugins\Plugin->run() 
#3 ...\core\src\Revolution\modScript.php(88): include('C:\\wamp64\\www\\m...') 
#4 ...\core\src\Revolution\modX.php(1710): MODX\Revolution\modScript->process(NULL) 
#5 ...\core\components\newspublisher\model\newspublisher\newspublisher.class.php(843): MODX\Revolution\modX->invokeEvent('OnRichTextEdito...', Array) 
#6 ...\core\c in ...\core\components\tinymcerte\src\Plugins\Events\OnRichTextEditorInit.php on line 53

The problem seems to be this line in the code:

$this->modx->invokeEvent('OnRichTextEditorInit', $fields);


MODX 3.0.3-pl
NewsPublisher 3.1.5-pl

Related thread in the MODX forum:
https://community.modx.com/t/newspublisher-rich-text-editor-cant-get-it-to-work/6929

@halftrainedharry halftrainedharry changed the title Fatal error when Fatal error when rich text editor is used Aug 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant