tinyMCE Rich Text Editor 2.0.9

MODX 3.0.4 and PHP 8.2.

Just installed the extra TinyMCE Rich Text Editor 2.0.9 and got error 500 in all pages on the front end with error message…

PHP Fatal error:  Uncaught Error: Call to a member function addJavascript() on null in /directory/xxxx/htdocs/directory/core/components/tinymcerte/src/Plugins/Events/OnRichTextEditorInit.php:53
Stack trace:
#0 /directory/xxxx/htdocs/directory/core/components/tinymcerte/src/Plugins/Events/OnRichTextEditorInit.php(41): TinyMCERTE\Plugins\Events\OnRichTextEditorInit->initTinyMCE()
#1 /directory/xxxx/htdocs/directory/core/components/tinymcerte/src/Plugins/Plugin.php(50): TinyMCERTE\Plugins\Events\OnRichTextEditorInit->process()
#2 /directory/xxxx/htdocs/directory/core/cache/includes/elements/modx/revolution/modplugin/15.include.cache.php(24): TinyMCERTE\Plugins\Plugin->run()
#3 /directory/xxxx/htdocs/directory/core/src/Revolution/modScript.php(88): include('/directory/d...')
#4 /directory/xxxx/htdocs/directory/core/src/Revolution/modX.php(1706): MODX\Revolution\modScript->process()
#5 /directory/xxxx/htdocs/directory/core/src/Revolution/Processors/Element/TemplateVar/Renders/web/output/richtext.class.php(33): MODX\Revolution\modX->invokeEvent()
#6 /directory/xxxx/htdocs/directory/core/src/Revolution/modTemplateVarRender.php(72): modTemplateVarOutputRenderRichText->process()
#7 /directory/xxxx/htdocs/directory/core/src/Revolution/modTemplateVar.php(480): MODX\Revolution\modTemplateVarRender->render()
#8 /directory/xxxx/htdocs/directory/core/src/Revolution/modTemplateVar.php(310): MODX\Revolution\modTemplateVar->getRender()
#9 /directory/xxxx/htdocs/directory/core/cache/includes/elements/modx/revolution/modsnippet/5.include.cache.php(456): MODX\Revolution\modTemplateVar->renderOutput()
#10 /directory/xxxx/htdocs/directory/core/src/Revolution/modScript.php(88): include('/directory/d...')
#11 /directory/xxxx/htdocs/directory/core/src/Revolution/modParser.php(508): MODX\Revolution\modScript->process()
#12 /directory/xxxx/htdocs/directory/core/components/pdotools/src/Parsing/Parser.php(276): MODX\Revolution\modParser->processTag()
#13 /directory/xxxx/htdocs/directory/core/src/Revolution/modParser.php(221): ModxPro\PdoTools\Parsing\Parser->processTag()
#14 /directory/xxxx/htdocs/directory/core/components/pdotools/src/Parsing/Parser.php(73): MODX\Revolution\modParser->processElementTags()
#15 /directory/xxxx/htdocs/directory/core/src/Revolution/modChunk.php(125): ModxPro\PdoTools\Parsing\Parser->processElementTags()
#16 /directory/xxxx/htdocs/directory/core/src/Revolution/modParser.php(470): MODX\Revolution\modChunk->process()
#17 /directory/xxxx/htdocs/directory/core/components/pdotools/src/Parsing/Parser.php(276): MODX\Revolution\modParser->processTag()
#18 /directory/xxxx/htdocs/directory/core/src/Revolution/modParser.php(221): ModxPro\PdoTools\Parsing\Parser->processTag()
#19 /directory/xxxx/htdocs/directory/core/components/pdotools/src/Parsing/Parser.php(73): MODX\Revolution\modParser->processElementTags()
#20 /directory/xxxx/htdocs/directory/core/src/Revolution/modParser.php(233): ModxPro\PdoTools\Parsing\Parser->processElementTags()
#21 /directory/xxxx/htdocs/directory/core/components/pdotools/src/Parsing/Parser.php(73): MODX\Revolution\modParser->processElementTags()
#22 /directory/xxxx/htdocs/directory/core/src/Revolution/modTemplate.php(147): ModxPro\PdoTools\Parsing\Parser->processElementTags()
#23 /directory/xxxx/htdocs/directory/core/src/Revolution/modResource.php(485): MODX\Revolution\modTemplate->process()
#24 /directory/xxxx/htdocs/directory/core/src/Revolution/modResource.php(465): MODX\Revolution\modResource->process()
#25 /directory/xxxx/htdocs/directory/core/src/Revolution/modResponse.php(72): MODX\Revolution\modResource->prepare()
#26 /directory/xxxx/htdocs/directory/core/src/Revolution/modRequest.php(154): MODX\Revolution\modResponse->outputContent()
#27 /directory/xxxx/htdocs/directory/core/src/Revolution/modRequest.php(138): MODX\Revolution\modRequest->prepareResponse()
#28 /directory/xxxx/htdocs/directory/core/src/Revolution/modX.php(1499): MODX\Revolution\modRequest->handleRequest()
#29 /directory/xxxx/htdocs/directory/index.php(63): MODX\Revolution\modX->handleRequest()
#30 {main}
  thrown in /directory/xxxx/htdocs/directory/core/components/tinymcerte/src/Plugins/Events/OnRichTextEditorInit.php on line 53

…if I disable OnRichTextEditorInit in the plugin, the error 500 goes away but there’s no RTE in the manage pages. Any help much appreciated

Why on the frontend? The TinyMCE text editor is usually only used in the manager.
Do you have an extra installed, that tries to use TinyMCE in the frontend?

As far as I know there’s nothing that tries to use TinyMCE in the frontend

I was able to reproduce the issue with a TV that has an “Output Type” = RichText.
Check your TVs and change the “Output Type” (in the tab “Output Options”) to Default (if it’s set to RichText).

Absolutely spot on Harry - thank you! One tv left over from an old blogging system was set to RichText

1 Like

FWIW, NewsPublisher uses TinyMCE in the front end.

2 Likes

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”.