This is searchable archive of our old support forums, which operated from 2012 - 2016. To find out how to get support for your current theme, please visit our support page.

Optimize Press Conflict Issue

  • Creator
    Topic
  • #23253
    John
    Participant

    Hi Jason,
    It seems this has come up in Alyeska:
    http://support.themeblvd.com/forums/topic/alyeska-interferring-with-the-live-editor-in-optimize-press/?view=all#post-16209

    I have layout builder ver 2.0.9.1 and jumpstart 2.0.1

    When trying to launch the live editor from the ‘edit page’ screen I get:
    Fatal error: Call to undefined function themeblvd_config() in /nas/wp/www/staging/hight/wp-content/plugins/theme-blvd-layout-builder/includes/general.php on line 270

    In looking at the Alyeska post and trying to apply to jumpstart I tried:
    if ( is_admin() ) {
    remove_action( ‘wp_enqueue_scripts’, ‘themeblvd_builder_styles’, 25 );
    }

    In the interest of covering all bases, I tried above and below the framework call in child theme functions.php. And with priorities 25 and 99.

    I feel like I must be close, but can’t seem to get there. Any thoughts?
    thanks,
    John

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #23254
    Jason Bobich
    Keymaster

    Hi John,

    The error you’re referencing should only happen on a page where our layout builder is applying a custom layout.

    So, it seems like the issue you’re having is that you’re trying to launch this plugin’s editor on a page where you’ve applied a custom layout from our builder? This plugin is its own builder to construct some sort of landing page, right? So, if you’re editing a specific page, make sure the page is saved with the “Default” page template and not the “Custom Layout” template.

    #23255
    John
    Participant

    No, the page is a default template page.
    http://s22.postimg.org/jcgtc4vkh/OP_Issue.jpg

    thx,
    John

    #23256
    Jason Bobich
    Keymaster

    Aw, I see now. It’s using themeblvd_config() to check if it’s a custom a layout or not.

    I think your initial guess is correct of removing this, except for if you’ve just got it in your child theme’s functions.php in the open, it’s not going to work. I think you’re removing the action before it’s actually been added.

    Notice how the Layout Builder plugin adds this action in a function, which is hooked to after_setup_theme?

    https://github.com/themeblvd/theme-blvd-layout-builder/blob/master/tb-builder.php#L166

    So, try something like this:

    function my_optimize_press_fixes() {
    	if ( ! function_exists('themeblvd_config') ) {
    		remove_action( 'wp_enqueue_scripts', 'themeblvd_builder_styles', 25 );
    	}
    }
    add_action('after_setup_theme', 'my_optimize_press_fixes', 11);
    #23257
    Jason Bobich
    Keymaster

    I’m actually updating the Layout Builder plugin now. I can easily make it so this error doesn’t happen. But knowing a little about the Optimize Press plugin, there’s a good chance some other error will pop up after this one is resolved.

    #23259
    John
    Participant

    Yep, I see what you mean. That works perfectly. Thx!! John

    #23260
    Jason Bobich
    Keymaster

    I posted an update to the layout plugin earlier. You shouldn’t actually need that code snippet any more after updating it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.