Home>Support>Problem with the “tinymce” rendering in Back Office

Problem with the “tinymce” rendering in Back Office

Hello,

I have a problem that is making me some noise. I use Site Origin Builder on a Multisite in WordPress, and I have 75 sites with pages builded with the builder.

My first problem is that I notice that sometime pages goes to wordpress textual editor, so I go back to the builder editor, but when I do this, I lost the style of my WYSIWYG editor (bold, li list, and co) in “tinymce” field.

My second problem, is that when I try to copy the website from my pre-production, to my production website, when I copy the database, I don’t know why, some pages on the production website have the builder datas saved, but pages are not using the builder, so the page has no widget showed. I have to pass the page to “builder” editor, and then resave the page, but when I do this, I loose my style in my WYSIWYG editor in “tinymce” fields, so it’s really a problem for me.

Do you know how I can fix it ? I see that the original SiteOrigin Editor hasn’t this problem, because the template code is rendered directly in textual wordpress editor, when I switch between the two mode, it keep the style in WYSIWYG field.

Thanks for your answer.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 2 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Hi

    Thanks for reaching out.

    My first problem is that I notice that sometime pages goes to wordpress textual editor, so I go back to the builder editor, but when I do this, I lost the style of my WYSIWYG editor (bold, li list, and co) in “tinymce” field.

    Are you able to reliably recreate this issue? If not, it will be hard to use testing to isolate the issue. If the issue is intermittent, please, try enabling PHP error logging as that may pick up the issue.

    https://www.wpbeginner.com/wp-tutorials/how-to-set-up-wordpress-error-logs-in-wp-config/

    When the issue does occur, please, try checking for errors in the browser console. Here is how:

    https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/#step-3-diagnosis

    My second problem, is that when I try to copy the website from my pre-production, to my production website, when I copy the database, I don’t know why, some pages on the production website have the builder datas saved, but pages are not using the builder, so the page has no widget showed. I have to pass the page to “builder” editor, and then resave the page, but when I do this, I loose my style in my WYSIWYG editor in “tinymce” fields, so it’s really a problem for me.

    Page Builder uses serialized data. When moving the database, are you perhaps doing find/replace operations in a manner that doesn’t support serialized data? https://wordpress.org/plugins/better-search-replace/ is an example of a plugin that supports serialized data.

    Thanks

  2. 2 years, 11 months ago xella

    Hello, thank for your reply.

    For my first problem : “My first problem is that I notice that sometime pages goes to wordpress textual editor, so I go back to the builder editor, but when I do this, I lost the style of my WYSIWYG editor (bold, li list, and co) in “tinymce” field.”
    I couldn’t say when it happen, but I’ve tried to switch between page builder, and wordpress editor, everytime I loose my style in my tinymce fields (ul list, bold). I notice that it’s not the case with the SiteOrigin Editor Widget, but when I check the code, I couldn’t find how you keep the tinymce style.

    For my second problem, thank you, I import the database and do my find and replace with the extension you suggest me, and it’s working :) ! Thank you so much !

  3. 2 years, 11 months ago Andrew Misplon
    Hi, I Work Here

    Thanks for the update.

    Although Page Builder supports moving between the Page Builder tab and the Text/Visual tab this move shouldn’t be used for normal operations. If the Page Builder tab isn’t loading there is most likely a JavaScript error on the page. If the issue was happening every time then it would be simple to do a plugin and theme conflict test. If the issue is not happening all the time then it’s very hard to run plugin and theme conflict tests. If possible, the next time the issue happens, please, try opening the console to check for errors. If errors are present in red text, please, take a screenshot. Here is how https://wordpress.org/support/article/using-your-browser-to-diagnose-javascript-errors/#step-3-diagnosis.

    Please, also enable PHP debugging so that when the issue occurs again you can capture PHP errors in the debug.log file.

    https://www.wpbeginner.com/wp-tutorials/how-to-set-up-wordpress-error-logs-in-wp-config/

    Separately, we can take a look at the TinyMCE formatting loss issue. Which widget are you using that is losing formatting?

    Thanks again.

  4. 2 years, 11 months ago xella

    Ok, I keep this in mind if I have the problem again for page that goes back to WordPress editor instead of Page Builder editor.

    I use custom widget, where I use the tinymce field, for exemple here :

    ‘text’ => array(
    ‘type’ => ‘tinymce’,
    ‘label’ => __( ‘Editer le texte du bloc’, ‘widget-form-fields-text-domain’ ),
    ‘default’ => ”,
    ‘rows’ => 10,
    ‘default_editor’ => ‘html’,
    ‘required’ => true,
    ‘button_filters’ => array(
    ‘mce_buttons’ => array( $this, ‘filter_mce_buttons’ ),
    ‘mce_buttons_2’ => array( $this, ‘filter_mce_buttons_2’ ),
    ‘mce_buttons_3’ => array( $this, ‘filter_mce_buttons_3’ ),
    ‘mce_buttons_4’ => array( $this, ‘filter_mce_buttons_5’ ),
    ‘quicktags_settings’ => array( $this, ‘filter_quicktags_settings’ ),
    ),
    ),

    And I simpli render it this way :

  5. 2 years, 11 months ago Alex S
    Hi, I Work Here

    Hi Xella,

    Are you adjusting button_filters? I ask as if you’re not and those methods don’t exist or are returning invalid data that can result in the editor not being like the SiteOrigin Editor widget does. Try using just:

    Kind regards,
    Alex

  6. 2 years, 11 months ago Alex S
    Hi, I Work Here

    Hi,

    Sorry, there was an issue with the previously provided snippet. Please try using:

    'text' => array(
    	'type' => 'tinymce',
    	'label' => __( 'Editer le texte du bloc', 'widget-form-fields-text-domain' ),
    	'rows' => 10,
    	'default_editor' => 'html',
    	'required' => true,
    ),
    

    Kind regards,
    Alex

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More