TinyMCE 4 / Joomla 3.2 Multiple editor issue
12 years 7 months ago #142863
by DeeEmm
TinyMCE 4 / Joomla 3.2 Multiple editor issue was created by DeeEmm
I have a custom field that uses a WYSIWYG editor so when creating or editing a product from the front end there are two editor windows shown on the page.
What I have found is that when the product is saved, the editors contents are not saved. All other fields are saved okay.
I have tried a test - changing the WYSIWYG field to a text field and everything then works okay.
The error I get is as follows:
TypeError: l is not a constructor tinymce.min.js (line
Hopefully you should be able to reproduce this on your local box, if not and you want access to my site, just let me know.
I've temporarily disabled the WYSIWYG for the custom field but would like to get a fix.
I'm not 100% sure it worked perfectly with the previous version of tinymce. whilst the content was saved I seem to remember that line breaks were not preserved in the custom field , perhaps this is relevant?
TIA
DM
What I have found is that when the product is saved, the editors contents are not saved. All other fields are saved okay.
I have tried a test - changing the WYSIWYG field to a text field and everything then works okay.
The error I get is as follows:
TypeError: l is not a constructor tinymce.min.js (line
Hopefully you should be able to reproduce this on your local box, if not and you want access to my site, just let me know.
I've temporarily disabled the WYSIWYG for the custom field but would like to get a fix.
I'm not 100% sure it worked perfectly with the previous version of tinymce. whilst the content was saved I seem to remember that line breaks were not preserved in the custom field , perhaps this is relevant?
TIA
DM
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142866
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic TinyMCE 4 / Joomla 3.2 Multiple editor issue
Hi,
Can you please indicate your HikaShop and HikaMarket version number ?
Thanks
Can you please indicate your HikaShop and HikaMarket version number ?
Thanks
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142868
by DeeEmm
Replied by DeeEmm on topic TinyMCE 4 / Joomla 3.2 Multiple editor issue
Ooops Sorry
HikaShop Business: 2.2.3
HikaMarket Multivendor: 1.3.2
HikaShop Business: 2.2.3
HikaMarket Multivendor: 1.3.2
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142887
by Jerome
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
Replied by Jerome on topic TinyMCE 4 / Joomla 3.2 Multiple editor issue
Hi,
I was able to reproduce the problem and I saw that the bug is not only an HikaMarket bug, it also happens in HikaShop backend.
The problem is that TinyMCE is initialized two times and Joomla 3.2 does not handle that the editor has been already initialized.
The TinyMCE 4 library does not handle the multiple initialization...
So I want to say that's more a Joomla bug than an HikaShop bug.. But, that's not the problem here.
We can fix it by editing the file "administrator/components/com_hikashop/helper/editor.php".
You have to replace
By
And also replace:
By
And it will fix the problem in HikaShop backend and in HikaMarket front-end, while editing a product or a category with a WYSIWIG custom field.
Regards,
I was able to reproduce the problem and I saw that the bug is not only an HikaMarket bug, it also happens in HikaShop backend.
The problem is that TinyMCE is initialized two times and Joomla 3.2 does not handle that the editor has been already initialized.
The TinyMCE 4 library does not handle the multiple initialization...
So I want to say that's more a Joomla bug than an HikaShop bug.. But, that's not the problem here.
We can fix it by editing the file "administrator/components/com_hikashop/helper/editor.php".
You have to replace
Code:
var $id = 'jform_articletext';
static $cpt = 0;
Code:
var $id = 'jform_articletext';
static $cpt = 0;
static $initialized = array();
Code:
$this->myEditor->initialise();
Code:
if(!HIKASHOP_J30 || empty(self::$initialized[$this->editor]))
$this->myEditor->initialise();
self::$initialized[$this->editor] = true;
Regards,
Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.
Also helping the HikaShop support team when having some time or couldn't sleep.
By the way, do not send me private message, use the "contact us" form instead.
The following user(s) said Thank You: DeeEmm
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142918
by DeeEmm
Replied by DeeEmm on topic TinyMCE 4 / Joomla 3.2 Multiple editor issue
Thanks for the super fast response Jerome.
Will give it a try and report back.
Will give it a try and report back.
Please Log in or Create an account to join the conversation.
12 years 7 months ago #142920
by DeeEmm
Replied by DeeEmm on topic TinyMCE 4 / Joomla 3.2 Multiple editor issue
Confirmed. Works as expected.
I concur with what you say about it being a TinyMCE4 library issue. I do not remember seeing this issue with the previous version of Tiny MCE.
Once again. Thanks!
I concur with what you say about it being a TinyMCE4 library issue. I do not remember seeing this issue with the previous version of Tiny MCE.
Once again. Thanks!
The following user(s) said Thank You: Jerome
Please Log in or Create an account to join the conversation.
Moderators: Obsidev
Time to create page: 0.224 seconds