• Resolved edemir206

    (@edemir206)


    Hi,

    There’s a bug when creating with gutenberg, it’s not a major bug but when we click on “create new post” the page flashes and shows some forminator related HTML link you can see in this picture: http://i63.tinypic.com/2h4fers.png

    After that the page loads normally.

    I was investigating and found that it was related to this line of code:

    $this->print_markup();

    That is located in the forminator/library/class-shortcode-generator.php file, this method should not be called when people use gutenberg as editor but only for classic editor. I found that if you use the gutenberg function is_gutenberg_page() right before wp_enqueue_script( ‘jquery-ui-core’ ); it solves the problem.

    So for me it worked like this:

    
    //In case this is gutenberg page we return the content without loading extra scripts.
    if( is_gutenberg_page() )
    		return $content;
    
    wp_enqueue_script( 'jquery-ui-core' );
    • This topic was modified 5 years, 6 months ago by edemir206.
    • This topic was modified 5 years, 6 months ago by edemir206.
    • This topic was modified 5 years, 6 months ago by edemir206.
Viewing 1 replies (of 1 total)
  • Thread Starter edemir206

    (@edemir206)

    Correcting my own code as I had issue with custom post types:

    //We should first verify that function is_gutenberg_page exists
    if(function_exists( 'is_gutenberg_page' ))
    {
          if( is_gutenberg_page() )
    	   return $content;
    }
    • This reply was modified 5 years, 6 months ago by edemir206.
Viewing 1 replies (of 1 total)
  • The topic ‘Display bug when creating with Gutenberg’ is closed to new replies.