• Resolved Philipp Stracker

    (@strackerphil-1)


    Hi James

    Thanks for creating this great plugin!

    When I first set up the plugin I only saw the WP error screen on the feature request page. All other pages did still work, just the archive page for feature requests failed to load.

    In the logs I found a fatal PHP error:

    Fatal error: Uncaught Error: Call to a member function get() on null

    I spent a few minutes to debug the issue, and it can be fixed very easily by changing a single if condition in your code:

    The reason for the error:

    Some other plugin uses the function get_post_meta() very early (before $wp_query is initialized). The SFR plugin intercepts this get_post_meta-call and tries to compare the query-type is_type('single') – this is-single check fails, because wp_query is not ready yet.

    Would love to see this (or a similar fix) in one of the next releases ??

    Let me know if you’d like my feedback on a possible fix or want to discuss this issue further.

    Thanks, Philipp ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hey Philipp,

    Thanks for reporting the bug! May I ask which version you’re on?

    I actually noticed this issue too, but went a different route for the fix. I updated the plugin earlier today (2.1.0).

    Let me know!

    Thanks,
    James

    Thread Starter Philipp Stracker

    (@strackerphil-1)

    Thanks for the quick reply and for fixing the issue even before it was reported ??

    I’ve updated the plugin – yesterday I did use version 2.0.1, now I use 2.1.0. Your fix is working perfectly on my website.

    Thanks and keep up the great work ??

    Great, glad that’s working for you now!

    It’d be great if you can leave a review when you’re ready ??

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘WP error on front end’ is closed to new replies.