WordPress.org

Ready to get started?Download WordPress

Forums

Query Wrangler
[resolved] Update has broken site (12 posts)

  1. cjeyes
    Member
    Posted 9 months ago #

    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.

    http://wordpress.org/plugins/query-wrangler/

  2. Jonathan Daggerhart
    Member
    Plugin Author

    Posted 9 months ago #

    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.

  3. cjeyes
    Member
    Posted 9 months ago #

    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/bestvalueconveyancing.co.uk/wp-includes/nav-menu-template.php 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.

  4. Jonathan Daggerhart
    Member
    Plugin Author

    Posted 9 months ago #

    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.

  5. cjeyes
    Member
    Posted 9 months ago #

    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.

  6. Jonathan Daggerhart
    Member
    Plugin Author

    Posted 9 months ago #

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

  7. cjeyes
    Member
    Posted 9 months ago #

    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.

  8. Jonathan Daggerhart
    Member
    Plugin Author

    Posted 9 months ago #

    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?

  9. cjeyes
    Member
    Posted 9 months ago #

    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.

  10. cjeyes
    Member
    Posted 9 months ago #

    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!

  11. tommyae
    Member
    Posted 9 months ago #

    Hey,

    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 query-pages.inc 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.

  12. Jonathan Daggerhart
    Member
    Plugin Author

    Posted 9 months ago #

    cjeyes,

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

Reply

You must log in to post.

About this Plugin

About this Topic