Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Joachim Jensen

    (@intoxstudio)

    Thanks for your feedback.

    What are your MySQL and PHP versions? It is odd that no errors can be found in your log.

    Without more information, I cannot know what the problem is, but I will try to reproduce it when I get time.

    Thread Starter David Wells

    (@davidwells)

    Its a new instance running correct versions.

    It would appear to a be php runtime issue. This is why no errors are thrown.

    I still have no clue why the two plugins conflict though

    Plugin Author Joachim Jensen

    (@intoxstudio)

    I can confirm the conflict leading to a white screen. No errors are shown in my logs either.

    I have found the conflicting function though, but I have no clue why it leads to a white screen.

    Content Aware Sidebars hooks into the “widgets_init” action to register the sidebars that have been created in the plugin. The function is pretty simple:

    $this->sidebars = get_posts(array(
    	'numberposts'	=> -1,
    	'post_type'	=> self::TYPE_SIDEBAR,
    	'post_status'	=> 'publish,private,future'
    ));
    
    foreach($this->sidebars as $post) {
    	register_sidebar( array(
    		'name'	=> $post->post_title,
    		'id'	=> self::SIDEBAR_PREFIX.$post->ID
    	));
    }

    It is recommended by the Codex to register sidebars in this hook: http://codex.wordpress.org/Function_Reference/register_sidebar

    Do you have an idea of what part of Leads that is conflicting?

    Plugin Author Joachim Jensen

    (@intoxstudio)

    The problem lies in your hooks into “parse_query” in wpl.m.post-type.wp-lead.php.

    You make it possible to append some query variables to _all_ queries – even the ones that are called before “admin_init”. And before this, get_current_screen() does not exist. The “widgets_init” hook is executed before “admin_init” which is why the problem occurs with Content Aware Sidebars.

    Because you prefix get_current_screen with @, all errors are suppressed, but because the error is fatal, a white screen is displayed.

    There are quite a few actions that are executed before “admin_init”, and it is, in my opinion, OK to use queries in many of these, so I recommend that you choose another method/action to append the query variables or that you make sure that get_current_screen exists before calling it.

    I mark this thread as resolved. Please let me know if you have any questions.

    Thread Starter David Wells

    (@davidwells)

    Dude thank you so much for this!

    I couldn’t figure it out for the life of me.

    We have fixed the bug and the plugins now can work happily together!

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Plugin Conflicts with WordPress Leads’ is closed to new replies.