VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Development & Testing => Topic started by: nguyenhoang999 on October 14, 2017, 02:36:46 AM

Title: Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce in Joomla 3.8.1
Post by: nguyenhoang999 on October 14, 2017, 02:36:46 AM
Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce in Joomla 3.8.1 and Joomla 3.8.0
i was tested in joomla 3.8.1 new setup, and creat Custom Field Editor VirtueMart, save -> not show editor-tinymce in Custom Field Editor. But,VirtueMart 3.2.4 in joomla 3.7.5 is good
How to fix it?
Title: Re: Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce in Joomla 3.8.1
Post by: Greystoke on October 19, 2017, 13:17:08 PM
Is there any fix for this please.
Title: Custom Field Editor VM 3.2.4 not show editor-tinymce in Joomla 3.8.2
Post by: nguyenhoang999 on November 18, 2017, 11:39:04 AM
Fixed
I have fix problem (tested Field Editor VirtueMart 3.2.4 in Joomla 3.8.0 - 3.8.1 and 3.8.2 is ok )
Now edit file: administrator\components\com_virtuemart\models\customfields.php
Find row: //'X'=>'COM_VIRTUEMART_CUSTOM_EDITOR', and code bellow (line 740: )

customfield_value . '</textarea>
<script type="text/javascript">// Creates a new editor instance
tinymce.execCommand("mceAddControl",true,"field-' . $row . '-customfield_value")
</script>';

replace with

<script type="text/javascript">// Creates a new editor instance
tinymce.execCommand("mceAddControl",true,"field-' . $row . '-customfield_value");
tinyMCE.init({
selector: "textarea.mceInsertContentNew",
  height: 500,
  theme: "modern",
  plugins: "print preview fullpage searchreplace autolink directionality visualblocks visualchars fullscreen image link media template codesample table charmap hr pagebreak nonbreaking anchor toc insertdatetime advlist lists textcolor wordcount imagetools contextmenu colorpicker textpattern",
  toolbar1: "formatselect | bold italic strikethrough forecolor backcolor | link | alignleft aligncenter alignright alignjustify  | numlist bullist outdent indent  | removeformat",
  image_advtab: true,
  });  
</script>';

Now, retry fresh page product VM you see ok