Support » Plugin: Annual Archive » Latest update broke our sites

  • Resolved Shaun Robinson


    The latest update of this plugin broke 4 of our websites, the error message was:

    Fatal Error: Call to a member function get() on a non-object in wp-includes/query.php on line 28

    I had to remove the plugin to keep the sites working.

Viewing 15 replies - 1 through 15 (of 30 total)
  • Plugin Contributor twinpictures


    Hmmm. Let’s see if we can figure out the issue together.
    Which version of WordPress are you using?
    How exactly are you using the plugin… sidebar widget? shortcode? which settings?

    Are you able to share a link to one of the sites that has the issue?
    We will try and recreate the issue on our end. To do so, it would be helpful if you could share as much info as you can. Much appreciated, thank you. We’ll get a solution ASAP. In the meantime, you can downgrade to the previous version here:

    • This reply was modified 1 year, 9 months ago by twinpictures. Reason: added link to previous version

    It is the latest version of WordPress.

    I cannot share a link to the sites. But the thing they all had in common was another plugin, which simply included something similar to the following lines:

    if(function_exists('get_field')) {
    $something = get_field('something', 'options');

    As you can see that is using the plugin Advanced Custom Fields, which was also up to date and active.

    Deactivating that plugin, or yours, fixed the issue. But that plugin is active on lots of sites with no issue, it’s only when it clashes with yours that is the problem.

    Plugin Contributor twinpictures


    ah ha… a clue!
    so there seems to be a plugin conflict with Advanced Custom Fields. When both are activated the issue occurs, correct? We’ll investigate this and get back to you.
    Thanks for the feedback and we apologize for any inconvenience this may have caused.

    No, not a conflict with ACF. Only a conflict when ANOTHER plugin uses ACF’s “get_field” function inside it, along with your plugin.

    Plugin Contributor twinpictures


    is this other plugin published, or custom built?

    Custom built

    Plugin Contributor twinpictures


    Still unable to recreate this issue on our end.
    We have a small updated on GitHub, but we’ll need more time to first see if we can recreate the issue.
    What version of PHP are the sites running, by the way?

    Plugin Contributor twinpictures


    Still unable to recreate this issue:

    Can you be more specific as to how your custom plugin is setup?

    I have the same problem,
    it creates a conflict with the plugin cooked, maybe you can use it to find the reason

    08.02.2018 09:16:09 servername [client  ] PHP Fatal error:  Uncaught Error: Call to a member function get() on null in wp-includes/query.php:28
    08.02.2018 09:16:09 servername [client  ] Stack trace:
    08.02.2018 09:16:09 servername [client  ] #0 wp-content/plugins/anual-archive/annual_archive.php(771): get_query_var('decade')
    08.02.2018 09:16:09 servername [client  ] #1 wp-includes/class-wp-hook.php(286): annual_archive_decade_filter(Object(WP_Query))
    08.02.2018 09:16:09 servername [client  ] #2 wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters('', Array)
    08.02.2018 09:16:09 servername [client  ] #3 wp-includes/plugin.php(515): WP_Hook->do_action(Array)
    08.02.2018 09:16:09 servername [client  ] #4 wp-includes/class-wp-query.php(1634): do_action_ref_array('pre_get_posts', Array)
    08.02.2018 09:16:09 servername [client  ] #5 wp-includes/class-wp-query.php(3222): WP_Query->get_posts()
    08.02.2018 09:16:09 servername [client  ] #6 wp-includes/class-wp-query.php(3328): WP_Query->query(Array)
    08.02.2018 09:16:09 servername [client  ] #7 wp-content/plugins/cooked/includes/class.cooked-recipes.php(100): WP_Query->_ in wp-includes/query.php on line 28

    PS: my WP version is 4.9.4

    • This reply was modified 1 year, 9 months ago by Sandra. Reason: WP Version
    Plugin Contributor twinpictures


    Thank you Sandra! We can now recreate the issue and should have a solution for you to test in the next 30 mintues.

    We might have resolved this issue. If you would be so kind, please install version 1.5.1b available from GitHub and let us know if this resolves the issue for you.

    • This reply was modified 1 year, 9 months ago by twinpictures. Reason: Added link to version 1.5.1b

    Thanks that version works 🙂

    Plugin Contributor twinpictures


    That’s splendid news.
    We’ll do a bit more testing and push out the official 1.5.1 release later today.
    A sincere thank-you for your feedback.

    Plugin Contributor twinpictures


    OK version 1.5.1 has been released here on WordPress. This issue should be resolved. Post back in this thread should you continue to experience this exact issue.

    Works nice on my system, thank you again. 🙂

    I hope Shaun Robinson’s problem is also solved.

    The previous update broke my site, and the latest release (and the one on Github) also.

    BTW why is the directory “anual” as opposed to “annual”?

Viewing 15 replies - 1 through 15 (of 30 total)
  • The topic ‘Latest update broke our sites’ is closed to new replies.