VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: Thanasis on July 07, 2016, 09:47:24 AM

Title: Virtuemart Editor problem
Post by: Thanasis on July 07, 2016, 09:47:24 AM
I have VirtueMart 3.0.16 and Joomla! 3.5.1.
When i update to  VirtueMart 3.0.16 i have problem with editor on custom fields, i had custom fields with editor and now the editor disappear. I use TinyMCE on Joomla configuration.
Title: Re: Virtuemart Editor problem
Post by: GJC Web Design on July 07, 2016, 15:26:39 PM
I think u need to at least incl. a screenshot about what u mean
Title: Re: Virtuemart Editor problem
Post by: Thanasis on July 07, 2016, 15:45:25 PM
First of all thanks for your replay. ;)
I have attached two pictures, on Editor section before i update the Joomla and Virtuemart to latest versions i use TinyMSC, when i update Joomla and Virtuemart the editor is gone.
On Global Configuration of Joomla i have TinyMCE and the plugin is enabled.
Thanks.
Title: Re: Virtuemart Editor problem
Post by: GJC Web Design on July 07, 2016, 16:40:54 PM
yes.. I don't get any editor on a "editor" custom field either...  :-\
Title: Re: Virtuemart Editor problem
Post by: baggiesmad on July 08, 2016, 13:18:58 PM
Quote from: GJC Web Design on July 07, 2016, 16:40:54 PM
yes.. I don't get any editor on a "editor" custom field either...  :-\

Yes I updated on Wednesday and get the same issue!
Title: Re: Virtuemart Editor problem
Post by: Studio 42 on July 08, 2016, 18:36:35 PM
I like the regression each time.
We had already this for some years.
Problem is tinyMce has changed
SO now it's :
tinymce.EditorManager.execCommand('mceAddEditor', true,"field-0-customfield_value");
ANd not
// Creates a new editor instance
tinymce.execCommand("mceAddControl",true,"field-0-customfield_value")


But the problem is that it depend now on your editor release.
If you don't use tinymce, but an editor based on tinymce,this probably do not work, and you need to use old code.
I think this code should be a function in the plugin. So you have not to hardcode the javascript to call the editor.

If you want to test this :
go in your product having this customfield.
Check fro the ID
and open the javascript console (f12) and copy this :

// REPLACE XXX by the plugin ID
tinymce.EditorManager.execCommand('mceAddEditor', true,"field-XXX-customfield_value");

Title: Re: Virtuemart Editor problem
Post by: jjk on July 20, 2016, 11:48:54 AM
The JCE editor still works with Joomla 3.6.0 and VM 3.0.17.2
Title: Re: Virtuemart Editor problem
Post by: ptrouw on August 08, 2016, 13:05:14 PM
I am running 3.0.16 en J3.6.2 en JCE editor 2.5.20 and I have the same problem in VM. I doesn't want to completely open an existing product, I have to stop the script.
Also tried it with older releases of JCE 2.5.18 and 19, but the same problem.
I tried it with adding a new product, and strangely that works fine.
Is the problem within JCE or VM?
Title: Re: Virtuemart Editor problem
Post by: GJC Web Design on August 08, 2016, 15:45:06 PM
as I understand it is them in combination.. 

but I use JCE on all my sites and have never seen this problem .. if u try another editor?
Title: Re: Virtuemart Editor problem
Post by: ptrouw on August 08, 2016, 16:08:22 PM
I have tried tinyMCE same problem. Installed DropEditor that one works fine!
It is definite related to tinyMCE. I also tried latest version of tinymce.min.js, and also old version, but no luck!

Another installation with vm3.016, JCE 2.5.19 and J3.5.1 works fine, but this site isn't updated yet.
The fix by Studio 42 I can't reproduce!

Any other ideas?
Title: Re: Virtuemart Editor problem
Post by: Studio 42 on August 08, 2016, 21:37:00 PM
If the editor is not set try:
tinymce.EditorManager.execCommand('mceAddEditor', true,"field-XXX-customfield_value");
XXX is the customfield html ID.
This work in some editors based on tinyMCE depending used tinymce.min.js release.
Remember that you have some based on jquery, some not. So this is only a test, to check if this can solve the problem and it's not a final solution
Title: Re: Virtuemart Editor problem
Post by: ptrouw on August 09, 2016, 12:07:21 PM
It is difficult to reproduce. Most products have no problem, they all have custom fields. Some products without customs field have this problem.