VirtueMart Forum

VirtueMart 2 + 3 => Virtuemart Development and bug reports => Topic started by: sirius on September 10, 2021, 14:43:21 pm

Title: Editor CustomField do not work anymore with JCE 2.9.12+
Post by: sirius on September 10, 2021, 14:43:21 pm
Hello,

when we upgrade to JCE 2.9.12+, our custom fields set to editor, do not show the editor anymore.

Ryan, owner of JCE, explained to me what is going on :

Quote from: Ryan Demmer
The issue is caused by some javascript in Virtuemart, which attempts to create a new editor instance, before all javascript (including JCE javascript) has loaded on the page, ie:
Code: [Select]
<script type="text/javascript">// Creates a new editor instance
    tinymce.execCommand("mceAddControl",true,"field-15-customfield_value")
</script>
Quote from: Ryan Demmer
This script is in administrator/components/com_virtuemart/models/customfields.php on line 788

The reason this happens with JCE Pro 2.9.12+ and not JCE Pro 2.9.11, is that the way the javascript is loaded in 2.9.12+ was changed for Joomla 4 compatability. Nevertheless, Virtuemart should not try an execute a javascript function until it is sure that javascript function has actually loaded!

Until Virtuemart fixes this (you might want to inform them of the issue), you will need to use JCE Pro 2.9.11

Thanks in advance