Support » Plugin: Query Wrangler » Update has broken site

  • Resolved cjeyes


    I’ve isolated QW as being the cause of an issue with my site, since the update.

    When activated the plugin is causing a load of errors similar to Warning: in_array() expects parameter 2 to be array, null given in…

    Many thanks for all the excellent work thus far – I hope this problem can be sorted out soon.

    Many thanks.

    Site is Best Value Conveyancing but the plugin is turned off right now.

Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Jonathan Daggerhart


    Thanks for the report.

    I’ve just made an update related to the in_array calls in QW. It only uses that function when editing a query, so it should not have broken the entire site.

    Please try the 1.5rc11 release and see if that corrects your issue.

    Thanks for looking into it – I’m afraid it’s still broken.
    If I activate the plugin my homepage is totally broken, with a long list of this:
    Warning: in_array() expects parameter 2 to be array, null given in /home/workercl/public_html/ on line 564
    Thereafter the rest of my normal homepage content is not displayed, and instead I get a list of posts from a particular category, which are not normally displayed on the homepage.
    Deactivate the plugin and things are back to normal.

    Plugin Author Jonathan Daggerhart


    Ok, looks like my fix for the WP 3.7 update is not working.

    I’ll have to research it further this afternoon. I’ll release a rc12 as soon as possible to try to fix this.

    Thanks. I hope it’s not too much of a pain! Generally I think QW is a great plugin – I use it on all my sites – so it’d be good to get it fixed.

    Plugin Author Jonathan Daggerhart


    No worries. Please try the rc12 release. This should avoid any issues with the home page.

    Really sorry, but it’s still broken (and I’ve made sure I’ve cleared all caches etc, both on computer and on the site itself).

    Somehow it seems to be changing the content of the homepage from the usual static content, to just a list of one particular category of posts. None of the other content on the homepage is being displayed.

    Plugin Author Jonathan Daggerhart


    Could you describe some of the queries you have on your site? Sounds like you may have some overrides and pages. If you have page queries, could you give me the paths you have them set to.

    Maybe even export your troublesome (at least homepage) queries and paste them here?

    Hi – I don’t think my queries are anything special. I have a couple of blog categories, and use QW to display posts from the two categories on the blog page.

    I don’t really understand why the problem is affecting the homepage, because I don’t use QW there (the Genesis Featured Posts widget handles that). So when the problem arises it is somehow replacing my static homepage with a list of posts from a category which is not normally displayed on the homepage.

    Instead, it is directing to a load of testimonial posts which normally appear here.

    Do you have an email address? I don’t want to post backend code such as queries on the open net.

    Thanks as ever.

    Actually, I’ve just discovered how to use Genesis to do the same thing, so I’m removing QW from the testimonials page.

    Feel free to investigate further however, to resolve the issue more generally. I have several other sites which use it and aren’t on Genesis!


    I’m using the 1.6 beta version now, had the same problem so I looked into it. Turns out that the nav-menu-template.php wants to know if our page has any ancestors. Adding this line in at line 242 fixes the problem:
    $post->ancestors = get_ancestors($post->ID, $post->post_type);
    But since this is a faked page, perhaps it’s better to just do
    $post->ancestors = array();
    since we know this page won’t have any ancestors. Either way, this solved it for me.

    Plugin Author Jonathan Daggerhart



    I’ve put tommyae’s fix into the newest release 1.5rc13, please let me know if this resolves your issue.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Update has broken site’ is closed to new replies.