VirtueMart Forum

VirtueMart 2 + 3 + 4 => Virtuemart Development and bug reports => Topic started by: nguyenhoang999 on October 05, 2017, 03:27:46 AM

Title: Custom Field Editor VM 3.2.4 not show editor-tinymce joomla 3.8.2
Post by: nguyenhoang999 on October 05, 2017, 03:27:46 AM
Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce
Joomla 3.8.1 and Joomla 3.8.0. 3.8.2 has 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: )

<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



Title: Re: Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce joomla 3.8.1
Post by: Mentalhacker on October 24, 2017, 23:39:07 PM
I have the same problem.
In Joomla 3.7.5 the TinyMCE editor works with custom field editor. After updating version 3.8.1 the custom field editor shows only the plain textfield.
Does anyone have an idea what causes this problem?
Thanks,
mentalhacker
Title: Re: Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce joomla 3.8.2
Post by: nguyenhoang999 on November 16, 2017, 07:59:25 AM
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
Title: Re: Custom Field Editor VM 3.2.4 not show editor-tinymce joomla 3.8.2
Post by: Parsimonious on October 05, 2018, 18:20:20 PM
Bumping this up as a reminder. It seems to still not have been fixed, so the file needs modified every time there is an update.
Title: Re: Custom Field Editor VM 3.2.4 not show editor-tinymce joomla 3.8.2
Post by: John Lee on November 27, 2019, 02:50:28 AM
Quote from: Parsimonious on October 05, 2018, 18:20:20 PM
Bumping this up as a reminder. It seems to still not have been fixed, so the file needs modified every time there is an update.

I have the same problem, have to modify the customfields.php file after each update.
I am using Joomla 3.9.13 and VirtueMart 3.6.10 10211.
Does anyone fixed the problem?

Thanks.

John Lee
Title: Re: Custom Field Editor VirtueMart 3.2.4 not show editor-tinymce joomla 3.8.2
Post by: DrShepard on July 01, 2021, 08:41:03 AM
Quote from: nguyenhoang999 on November 16, 2017, 07:59:25 AM
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
Hello! There was the same error, I used your code and the editor appeared. BUT! But this editor does not display the insert module or menu buttons. Can you tell me how to make them appear?