WordPress.org

Forums

Business Directory Plugin
[resolved] Conflict with PODS Plugin (8 posts)

  1. lok1728
    Member
    Posted 2 years ago #

    Seems PODS plugin and Business Directory conflict and I receive the following error:
    PHP Fatal Error: Call to a member function get() on a non-object in wp-includes/query.php on line 27

    I've made a post regarding this conflict on the PODS forum as well. Is it possible to have these two plugins work together?

    http://wordpress.org/extend/plugins/business-directory-plugin/

  2. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    This plugin seems to integrate with WP_Query, but relies on $wp_query being set in proxy to use of get_query_var().

  3. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    This plugin can either check if $wp_query is an object before calling get_query_var, or integrate with WP_Query further down the action pipeline.

  4. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    If this plugin runs it's add_action for the WP_Query actions by adding the add_action for those actions during 'init', there should be no further conflict.

  5. lok1728
    Member
    Posted 2 years ago #

    Thank you Scott for replying. I'm not sure where to change those items, but I'm hoping the developer can make the updates to resolve the conflicts. Thanks again!

  6. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    I double checked the code, at the bottom of the plugin's main file this runs the init:

    $wpbdp = new WPBDP_Plugin();
    $wpbdp->init();

    One solution would be to place this line within the _plugin_initialization function instead:

    add_action('pre_get_posts', array($this, '_pre_get_posts'));

  7. businessdirectoryplugin
    Member
    Plugin Author

    Posted 2 years ago #

    Hi Scott,

    Thanks for the info, we'll look to add it for a patch release. In the meantime, anyone can use the workaround outlined above.

  8. Scott Kingsley Clark
    Member
    Posted 2 years ago #

    I've also made some tweaks to the next version of Pods which should hopefully resolve most of these issues as it runs further up the action chain itself too.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Business Directory Plugin
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic