Title: Plugin Conflicts with WordPress Leads
Last modified: August 21, 2016

---

# Plugin Conflicts with WordPress Leads

 *  Resolved [David Wells](https://wordpress.org/support/users/davidwells/)
 * (@davidwells)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/)
 * Hey Joachim,
 * We had a user report a plugin conflict with this plugin and ours [http://wordpress.org/plugins/leads/](http://wordpress.org/plugins/leads/)
   where when both are installed the wp-admin does not load and whitescreens.
 * I was unable to see any PHP errors with WP_DEBUG or within server logs on my 
   local machine here.
 * Can you see where the potential error might be happening?
 * Many thanks!
    – David
 * [http://wordpress.org/plugins/content-aware-sidebars/](http://wordpress.org/plugins/content-aware-sidebars/)

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

 *  Plugin Author [Joachim Jensen](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/#post-4408019)
 * 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](https://wordpress.org/support/users/davidwells/)
 * (@davidwells)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/#post-4408101)
 * 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](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/#post-4408121)
 * 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](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](https://wordpress.org/support/users/intoxstudio/)
 * (@intoxstudio)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/#post-4408123)
 * 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](https://wordpress.org/support/users/davidwells/)
 * (@davidwells)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/#post-4408124)
 * 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.

 * ![](https://ps.w.org/content-aware-sidebars/assets/icon-256x256.png?rev=1815877)
 * [Content Aware Sidebars - Fastest Widget Area Plugin](https://wordpress.org/plugins/content-aware-sidebars/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/content-aware-sidebars/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/content-aware-sidebars/)
 * [Active Topics](https://wordpress.org/support/plugin/content-aware-sidebars/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/content-aware-sidebars/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/content-aware-sidebars/reviews/)

## Tags

 * [conflicts](https://wordpress.org/support/topic-tag/conflicts/)

 * 5 replies
 * 2 participants
 * Last reply from: [David Wells](https://wordpress.org/support/users/davidwells/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/plugin-conflicts-with-wordpress-leads/#post-4408124)
 * Status: resolved