[Skip to main content](#vessel-content)

#   TinyMCE 4 / Joomla 3.2 Multiple editor issue

##

- **[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")**
- [![DeeEmm's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26410.jpg)](/forum/user/26410-deeemm "View DeeEmm's Profile") Topic Author
- [ Offline](/forum/user/26410-deeemm)

Less More

- Posts: 114
- Thank you received: 14
-
- [](http://deeemm.com)
-

12 years 9 months ago [\#142863](#142863) by [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")  *[TinyMCE 4 / Joomla 3.2 Multiple editor issue](/forum/19-hikamarket/865659-tinymce-4-joomla-3-2-multiple-editor-issue#142863 "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 8)  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")* was created by *[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")*

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 ![8)](/media/kunena/emoticons/9.png "8)")*

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

---

[ deeemm.com](http://deeemm.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODY1NjU5LXRpbnltY2UtNC1qb29tbGEtMy0yLW11bHRpcGxlLWVkaXRvci1pc3N1ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 9 months ago [\#142866](#142866) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[TinyMCE 4 / Joomla 3.2 Multiple editor issue](/forum/19-hikamarket/865659-tinymce-4-joomla-3-2-multiple-editor-issue#142866 "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 8)  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")*

Hi,

Can you please indicate your HikaShop and HikaMarket version number ?

Thanks

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODY1NjU5LXRpbnltY2UtNC1qb29tbGEtMy0yLW11bHRpcGxlLWVkaXRvci1pc3N1ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")**
- [![DeeEmm's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26410.jpg)](/forum/user/26410-deeemm "View DeeEmm's Profile") Topic Author
- [ Offline](/forum/user/26410-deeemm)

Less More

- Posts: 114
- Thank you received: 14
-
- [](http://deeemm.com)
-

12 years 9 months ago [\#142868](#142868) by [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")  Replied by *[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")* on topic *[TinyMCE 4 / Joomla 3.2 Multiple editor issue](/forum/19-hikamarket/865659-tinymce-4-joomla-3-2-multiple-editor-issue#142868 "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 8)  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")*

Ooops Sorry

HikaShop Business: 2.2.3
HikaMarket Multivendor: 1.3.2

---

[ deeemm.com](http://deeemm.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODY1NjU5LXRpbnltY2UtNC1qb29tbGEtMy0yLW11bHRpcGxlLWVkaXRvci1pc3N1ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26401
- Thank you received: 4081
-
- [](http://obsi.dev)
-

12 years 9 months ago [\#142887](#142887) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[TinyMCE 4 / Joomla 3.2 Multiple editor issue](/forum/19-hikamarket/865659-tinymce-4-joomla-3-2-multiple-editor-issue#142887 "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 8)  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")*

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 Code:

var $id = 'jform_articletext'; static $cpt = 0;

By Code:

var $id = 'jform_articletext'; static $cpt = 0; static $initialized = array();

And also replace: Code:

$this-&gt;myEditor-&gt;initialise();

By Code:

if(!HIKASHOP_J30 &#124;&#124; empty(self::$initialized[$this-&gt;editor])) $this-&gt;myEditor-&gt;initialise(); self::$initialized[$this-&gt;editor] = true;

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,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

The following user(s) said Thank You: [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODY1NjU5LXRpbnltY2UtNC1qb29tbGEtMy0yLW11bHRpcGxlLWVkaXRvci1pc3N1ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")**
- [![DeeEmm's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26410.jpg)](/forum/user/26410-deeemm "View DeeEmm's Profile") Topic Author
- [ Offline](/forum/user/26410-deeemm)

Less More

- Posts: 114
- Thank you received: 14
-
- [](http://deeemm.com)
-

12 years 9 months ago [\#142918](#142918) by [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")  Replied by *[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")* on topic *[TinyMCE 4 / Joomla 3.2 Multiple editor issue](/forum/19-hikamarket/865659-tinymce-4-joomla-3-2-multiple-editor-issue#142918 "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 8)  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")*

Thanks for the super fast response Jerome.

Will give it a try and report back.

---

[ deeemm.com](http://deeemm.com)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODY1NjU5LXRpbnltY2UtNC1qb29tbGEtMy0yLW11bHRpcGxlLWVkaXRvci1pc3N1ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")**
- [![DeeEmm's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar26410.jpg)](/forum/user/26410-deeemm "View DeeEmm's Profile") Topic Author
- [ Offline](/forum/user/26410-deeemm)

Less More

- Posts: 114
- Thank you received: 14
-
- [](http://deeemm.com)
-

12 years 9 months ago [\#142920](#142920) by [DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")  Replied by *[DeeEmm](/forum/user/26410-deeemm "View DeeEmm's Profile")* on topic *[TinyMCE 4 / Joomla 3.2 Multiple editor issue](/forum/19-hikamarket/865659-tinymce-4-joomla-3-2-multiple-editor-issue#142920 "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 8)  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")*

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!

![:D](/media/kunena/emoticons/1.png ":D")

---

[ deeemm.com](http://deeemm.com)

The following user(s) said Thank You: [Jerome](/forum/user/80-jerome "View Jerome's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzE5LWhpa2FtYXJrZXQvODY1NjU5LXRpbnltY2UtNC1qb29tbGEtMy0yLW11bHRpcGxlLWVkaXRvci1pc3N1ZT90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

Moderators: [Obsidev](/forum/user/7040-obsidev "View Obsidev's Profile")

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.050 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
