Support » Plugin: Participants Database » Fatal error: Call to a member function get() on null in …/query.php on line 28

  • Resolved awijasa

    (@awijasa)


    Hello,

    Having Participants Database 1.7.3.2 and Events Manager Pro 2.5 installed and activated will cause a WordPress site to stop loading with an error message:

    Fatal error: Call to a member function get() on null in …/query.php on line 28

    It may have something to do with $wp_query or get_query_var, but so far I have no luck finding a clue.

    Please let me know what you think.

    Thanks,

    Adrian

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author xnau webdesign

    (@xnau)

    Well, Participants Database doesn’t interact with wp_query, but just about everything else does. You only see the error with Participants Database activated?

    Hello,

    I only see the error when Participants Database (PD) is activated together with Events Manager (EM) Pro 2.5 or EM Pro Dev.

    PD plays well with the free version of EM.

    In the worst case, I’m sticking with PD and getting rid of the EM Pro.

    If I spin up a WordPress instance with the Twenty Seventeen theme + PD 1.7.3.2 + EM 5.7.3 + EM Pro 2.5 and give you an Administrator login, will you be able to troubleshoot? Please let me know your cost estimate to do this troubleshoot, just in case I can afford it.

    Thanks,

    Adrian

    Plugin Author xnau webdesign

    (@xnau)

    I’d rather not get in there and troubleshoot, this kind of incompatibility can be hard to pinpoint, and in this case it looks like that Events Manager plugin is generating a conflict. Participants Database doesn’t call that function.

    I would think the other vendor would be willing to look into this, since you’re paying for a premium plugin.

    Hello,

    Totally understood! Yes, you would think that the Events Manager Pro will be eager to please their Pro customers, but I’m only paying $75/yr. Not enough for the platinum treatment I guess 🙂

    Do you mind if I copy and paste your message to the Events Manager Pro support? I’d like to give them an update and a little bit of a burn for their standard Pro customer treatment. Just want to give them a hard time. As a fellow developer, I understand that it’s reasonable that they won’t bend their backs for a $75 paying customer.

    Let me know what you think on this.

    I’ll most likely proceed by deactivating Events Manager Pro.

    Awesome job on the PD plugin by the way!

    Thanks

    Adrian

    Plugin Author xnau webdesign

    (@xnau)

    I don’t mind at all…and I do want to help, it’s just that I’m not willing to go through someone else’s code…if they say my plugin is doing something wrong, I’d love to hear about it.

    Marcus

    (@netweblogic)

    Hi, Marcus here, developer of Events Manager (and Pro).

    I did look into it, because there wasn’t a way to deduce which plugin was at fault here. I’m fairly certain it’s yours though, and that can be demonstrated with this snippet that has nothing to do with EM and is perfectly valid WP code AFAIK:

    
    function participants_directory_fail_test(){
    	get_query_var('some_var_name', false);
    }
    add_action('parse_query', 'participants_directory_fail_test');
    

    My guess is you’re manipulating the $wp_query global object in some way which is causing the problem, but I’ll leave debugging your own plugin to you, I just had to prove it wasn’t us 😉

    Given it’s a fairly easy workaround to prevent us from sparking that error, that shouldn’t impact customers, I’ve posted a solution on our pro support forum where the error was reported.

    • This reply was modified 5 months ago by  Marcus.
    awijasa

    (@awijasa)

    Hello Marcus,

    Adrian here. I tested the fail test above by adding it to the top of a functions.php of my test site. My test site has PD 1.7.3.2 and EM 5.7.3 installed, with EM Pro 2.5 deactivated.

    However, my site ends up still running just fine with no Debug output that points to the query.php line 28 or parse_query.

    Only if I activate EM Pro 2.5, then I start seeing the query.php line 28 error.

    Let me know if I’m putting the fail test in a wrong place.

    Thanks,

    Adrian

    awijasa

    (@awijasa)

    Marcus,

    Although I still can’t get the fail test above to crash my test site or produce a debug message, adding the code snippet you posted on https://eventsmanagerpro.com/support/tickets/fatal-error-call-to-a-member-function-get-on-null-in-query-php-on-line-28/ into the mu-plugins folder solves the problem!

    Thank you very much for that code!

    Adrian

    Marcus

    (@netweblogic)

    I would like to update this thread and state that this is not necessarily a bug where Participants Database is at fault actually.

    This error could have been prevented with better handling in WP core. I’m going to submit a ticket to them about it.

    For those that didn’t see the other thread in our pro forums, we have an updated dev version that prevents this error from happening.

    Thank you very much Marcus!!

    Adrian

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