Strange TinyMCE issue in OJS 2.4.3

One of our editors ran into a problem where clicking on the Edit Metadata link on the submission Summary page (which initiates the editor/viewMetadata/### page) caused her browser to freeze for a particular submission. Internet Explorer would sit there spinning away and eventually bring up a dialog indicating that a script was unresponsive. I replicated the same behaviour with Firefox and Firefox Developer. This issue has not arisen before.

After much investigation I determined that the problem was related to the display of the abstract in the templates/submission/metadata/metadataEdit.tpl template. Commenting out that line fixed the problem. Alternatively, disabling TinyMCE (which we had enabled) also eliminates the problem, and the page displays normally.

Here’s where the strangeness occurs. The abstract is 1420 characters. If I truncate the abstract to 900 characters using “|truncate:900”, it displays those 900 characters properly with TinyMCE enabled and I can edit it fine. However the browser freezes with 901 characters. The abstract contains a less-than sign among those 900 characters. If I remove the “<”, the problem completely goes away and I can work with all 1419 characters including re-adding the less than sign. I believe the problem is coming from the special nature of the < sign for HTML, but I don’t know what makes 900 characters significant for TinyMCE.

I have addressed the problem by editing the plugins/TinyMCEPlugin.inc.php and commenting out the lines related to editor & sectionEditor viewMetadata/saveMetadata, which turns off the plugin for this page. I note that the TinyMCE version is 3.4.9. Is there a newer version compatible with this version of OJS?
Thanks,
Roger

Hi @rkemp,

the error is related to the version of TinyMCE and was solved in 4.4 TinyMCE. For 2.x there is not new version which you can simply exchange see this thread.

Hope this helps

Claudia Jürgen

2 Likes

Hi Claudia,
Thanks for the info. The links were indeed helpful.
Roger