Home>Support>visual editor boke page

visual editor boke page

By fpweb, 9 years ago. Last reply by Andrew Misplon, 9 years ago.

Hi!
I have a problem, when I want use style like “text center” in visual editor, after update all content broke.
After change on page edit I can run preview and all is ok.
After publish or update page builder broke and site did not look good.

I have install:
Page Builder by SiteOrigin
SiteOrigin Widgets Bundle
Black Studio TinyMCE Widget

I tried to update all widget, but it isn’t help.

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

  1. 9 years, 21 days ago Andrew Misplon
    Hi, I Work Here

    Hi Fpweb

    Do you have a public URL where we can take a look at what’s going on? If you need to keep this URL private from other users, just select “Private Reply” on the bottom right of the comment box.

  2. 9 years, 21 days ago fpweb

    Hi!
    I think it is something with server, on my serwer all working good but on client this element breake.
    In browser consol I dont get any errors.

    http://atb.labmoryc.com.pl/ – all is ok
    http://atbmeble.pl/ – something wrong.

    Do you want login to the page?

    link to test page:
    http://atb.labmoryc.com.pl/test/
    http://atbmeble.pl/test-2/

    I’m created widget:

    class Wstep_Widget extends SiteOrigin_Widget {
    
    		function __construct() {
    		//Here you can do any preparation required before calling the parent constructor, such as including additional files or initializing variables.
    			$form_options = array(
    				'tytul' => array(
    					'type' => 'text',
    					'label' => __( 'Tytuł wstępu', 'fpweb' ),
    					'default' => ''
    				),
    				'tekst' => array(
    					'type' => 'tinymce',
    					'label' => __( 'Wstęp - lid', 'fpweb' ),
    					'default' => 'Przykładowy tekst wstępu',
    					'rows' => 10,
    					'default_editor' => 'visual',
    					'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' ),
    					),
    				),
    				'url_tytul' => array(
    					'type' => 'text',
    					'label' => __( 'Tekst na przycisku', 'fpweb' ),
    					'default' => 'Sprawdź'
    				),
    				'url' => array(
    					'type' => 'link',
    					'label' => __('Dodaj link jeśli ma się pojawić przycisk', 'fpweb'),
    					'default' => ''
    				),
    
    			);
    
    	//================================
    	//Call the parent constructor with the required arguments.
    	//
    	//DATA FOR WIDGET
    	//================================
    		parent::__construct(
    				// The unique id for your widget.
    				'wstep-widget',
    
    				// The name of the widget for display purposes.
    				__('Wstęp - lid', 'fpweb'),
    
    				// The $widget_options array, which is passed through to WP_Widget.
    				// It has a couple of extras like the optional help URL, which should link to your sites help or support page.
    				array(
    						'description' => __('Wstęp do strony', 'fpweb'),
    						'panels_groups' => array('atb_group','recommended'),
    						'panels_icon' => 'dashicons dashicons-megaphone'
    				),
    
    				//The $control_options array, which is passed through to WP_Widget
    				array(
    				),
    
    				//The $form_options array, which describes the form fields used to configure SiteOrigin widgets. We'll explain these in more detail later.
    				$form_options
    
    				);
    		}
    
    		public function widget( $args, $instance ) {
    			include('tpl/tpl.php');
    		}
    		function get_template_name($instance) {
    				return 'wstep_tpl';
    		}
    
    		function get_style_name($instance) {
    				return '';
    		}
    
    		function filter_mce_buttons( $buttons, $editor_id ) {
    		if ( ( $key = array_search( 'fullscreen', $buttons ) ) !== false ||
    				 ( $key = array_search( 'dfw', $buttons ) ) !== false) {
    			unset($buttons[$key]);
    		}
    		return $buttons;
    		}
    		function filter_mce_buttons_2( $buttons, $editor_id ) {
    			if ( ( $key = array_search( 'fullscreen', $buttons ) ) !== false ||
    					 ( $key = array_search( 'dfw', $buttons ) ) !== false) {
    				unset($buttons[$key]);
    			}
    			return $buttons;
    		}
    		function filter_mce_buttons_3( $buttons, $editor_id ) {
    			if ( ( $key = array_search( 'fullscreen', $buttons ) ) !== false ||
    					 ( $key = array_search( 'dfw', $buttons ) ) !== false) {
    				unset($buttons[$key]);
    			}
    			return $buttons;
    		}
    		function filter_mce_buttons_4( $buttons, $editor_id ) {
    			if ( ( $key = array_search( 'fullscreen', $buttons ) ) !== false ||
    					 ( $key = array_search( 'dfw', $buttons ) ) !== false) {
    				unset($buttons[$key]);
    			}
    			return $buttons;
    		}
    		public function quicktags_settings( $settings, $editor_id ) {
    			$settings['buttons'] = preg_replace( '/,fullscreen/', '', $settings['buttons'] );
    			$settings['buttons'] = preg_replace( '/,dfw/', '', $settings['buttons'] );
    			return $settings;
    		}
    		function sanitize_date( $date_to_sanitize ) {
    			// Perform custom date sanitization here.
    			$sanitized_date = sanitize_text_field( $date_to_sanitize );
    			return $sanitized_date;
    		}
    
    
    }
    siteorigin_widget_register('Wstep Widget', THEME_PLUGIN_DIRECTORY.'so_plugins/wstep/', 'Wstep_Widget');
    

    and tinymce breake to.

  3. 9 years, 21 days ago fpweb

    I found this threat https://wordpress.org/support/topic/official-topic-for-compatibility-issues-with-page-builder-by-siteorigin.

    Now im uninstall Black Studio TinyMCE Widget, and I see that page builder use TinyMCE in SiteOrigin editor, but effet is the same like before, all use style and save, breake PB in editor.

  4. 9 years, 21 days ago Andrew Misplon
    Hi, I Work Here

    Thanks. I’ll Greg if he can comment on the .org thread when he’s free.

    Can you confirm. Is the problem with the SiteOrigin Editor happening with all plugins de-activated except for Page Builder and the Widgets Bundle AND a default theme activated, Twenty Fifteen.

    Can you test the above vanilla setup for us, please.

    Also, if you see any console errors, please, send.

    Thanks

    • 9 years, 21 days ago fpweb

      Can you confirm. Is the problem with the SiteOrigin Editor happening with all plugins de-activated except for Page Builder and the Widgets Bundle AND a default theme activated, Twenty Fifteen.
      – yes i try this, and this confirmed me that something is with Page Builder or new WordPress
      — downgrade WP to 4.2.4
      — downgrade PB to 2.1.2
      — Bundle – 1.4.2
      – heps
      – next Im update Bundle, next WP and all OK.
      – after update PB – all break.

      • 9 years, 21 days ago Andrew Misplon
        Hi, I Work Here

        Thanks for checking!

        • 9 years, 20 days ago fpweb

          http://atb.labmoryc.com.pl/ – is my develop serwer, all works OK with all updates.
          I created copy with duplicator and install to http://atbmeble.pl/ – clients serwer home.pl

          Content with PB works OK
          Edit post/page works OK
          If on edit page was widget who use TinyMCE and text align, after update or save all breake and run in visual editor.
          Run past copy or import in editor works OK, but after update again mess.
          0 errors, in browser consol, 0 errors php, ajax request OK.

          Thats all what I can test on working project.

  5. 9 years, 21 days ago fpweb

    Hi again,
    downgrade Page Builder to 2.1.2 helps.

    Black Studio TinyMCE Widget works
    SO Bundle is OK
    Only Page Builder have problem with TinyMCE

    In my case problem is only with text align (I think he have problem with ).

    Andrew Misplon can you write here when this problem was found and fixed?

  6. 9 years, 21 days ago Andrew Misplon
    Hi, I Work Here

    I’d need to be able re-create the bug and log first.

    So what was wrong here:
    http://atbmeble.pl/ – something wrong.

    Was it just text align controls not working?

  7. 9 years, 20 days ago fpweb

    Ok I have next tip
    Now client serwer use PHP 5.3.29
    After chenge to 5.4 , 5.5, 5.6 and update Page Bulder to 2.2 i have error in editor

    Warning: Illegal string offset 'title' in /atb2015/wp-content/plugins/siteorigin-panels/siteorigin-panels.php on line 475[\code]
    [code]
    /**
     * @param $a
     * @param $b
     */
    function siteorigin_panels_widgets_sorter($a, $b){
    	return $a['title'] > $b['title'] ? 1 : -1;
    }
    

    After run PHP > 5.3.29 problem solved, save/update work but this php errors breake WP left sidebar

  8. 9 years, 20 days ago Andrew Misplon
    Hi, I Work Here

    Thanks for reporting this. The bug originates from widgets without titles. Can you please, check your widgets and make sure they all have titles.

  9. 9 years, 20 days ago Andrew Misplon
    Hi, I Work Here

    We’ve just resolved:
    https://github.com/siteorigin/siteorigin-panels/commit/03c5e375166b50e5accf5bef4a6e7672dec5da41

    Fix will be included in the next version. Thanks again.

  10. 9 years, 20 days ago fpweb

    Thanks for support!

    Yes sometimes I use widget without title, this update solved all my problem.

    Conclusion to FAQ:
    – make sure you have correct PHP version on hosting
    – update all

    == case closed ==

  11. 9 years, 20 days ago Private Message - fpweb

    This is a private message.

  12. 9 years, 20 days ago Andrew Misplon
    Hi, I Work Here

    Thanks again for all the effort.

    Any ideas for a new title?

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