• Resolved smithwib

    (@smithwib)


    Love this plugin, thanks so much for making it available.

    I upgraded from some version of 1.5 to the current one rc21 and when trying to go to the home page, it rerouted me to a page that had a query wrangler shortcode on it (happens to be the first one in the list of query wrangler definitions).

    There are a lot of errors in the debug log, including ones like this:

    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined index: exclude_display in E:\web\cpcrn\docs\wp-content\plugins\query-wrangler\includes\theme.inc on line 401
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_name in E:\web\cpcrn\docs\wp-includes\query.php on line 3685
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_name in E:\web\cpcrn\docs\wp-includes\query.php on line 3685
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_name in E:\web\cpcrn\docs\wp-includes\query.php on line 3685
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_name in E:\web\cpcrn\docs\wp-includes\query.php on line 3685
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_name in E:\web\cpcrn\docs\wp-includes\query.php on line 3685
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_name in E:\web\cpcrn\docs\wp-includes\query.php on line 3685
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_author in E:\web\cpcrn\docs\wp-includes\query.php on line 3941
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_date in E:\web\cpcrn\docs\wp-includes\query.php on line 3943
    [25-Mar-2014 16:30:15 UTC] PHP Notice: Undefined property: stdClass::$post_date in E:\web\cpcrn\docs\wp-includes\query.php on line 3944

    Not sure if this might be a conflict, but I am using custom post types, custom taxonomies, etc.

    https://www.ads-software.com/plugins/query-wrangler/

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

    (@daggerhart)

    Crud. Looking into it.

    Thread Starter smithwib

    (@smithwib)

    Sorry Jonathan — meant to say rc21, the current one…

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Is this every page on your site, or just the home page? Also, how are your permalinks setup? Looking into this, but I’m not having any issues on my dev site.

    Could you provide any more details about the issue?

    Thread Starter smithwib

    (@smithwib)

    Just the home page — everything else works. Same thing if I try to preview the home page. If I switch the home page to another page, same thing — that page will not come up.

    Permalinks use the Day and Name option (/2014/03/25/sample-post/)

    To troubleshoot, I did the following:
    – Added a “die()” to the home page template — no change, it wasn’t getting that far
    – Turned on logging – saw some errors coming from QW and Custom Post Type UI. Deactivated those and other plugins, problem went away.
    – Reactivated plugins till I hit QW.

    Note that the wp-admin bar does not appear on the page when it happens. Otherwise, the QW shortcode works as it should.

    ALso, I am not using any page paths with the QW definitions.

    Thread Starter smithwib

    (@smithwib)

    Here’s another error that showed up — [25-Mar-2014 16:30:13 UTC] PHP Notice: Undefined offset: 0 in ..\wp-content\plugins\query-wrangler\includes\pages.inc on line 215

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Can you edit that file: \wp-content\plugins\query-wrangler\includes\pages.inc

    And at line 146 change:

    if($op == '404' ||
    $op == 'default')
    {

    to

    if($op == 'default')
    {

    And let me know fix that resolves the issue? For some reason, the homepage acts like a 404 page since WP 3.7

    Thread Starter smithwib

    (@smithwib)

    Sure thing. Need to update the dev version and try there. Back soon.

    Thread Starter smithwib

    (@smithwib)

    No change.

    In line 126, qw_get_page_op() comes back as default. Perhaps it should be testing for is_front_page in addition to is_home, but I’m not sure how that impacts future functionality. Later, it checks for a page path (qw_get_path), but it does not rule out ”, which all of the non-page-path definitions have, so you get an immediate match in the SQL query.

    May be wildly off here…

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Can you add this at line 135 of that file?


    if (empty($path)){
    return;
    }

    That seems like a reasonable cause of the problem, but I can’t replicate the issue.

    Thread Starter smithwib

    (@smithwib)

    That did the trick. Thanks!

    Plugin Author Jonathan Daggerhart

    (@daggerhart)

    Great! Pushed out as 1.5rc22.

    I’m going to have to rewrite this thing someday soon. All that page routing stuff is somewhat legacy code at this point, since I’ve disable the creation of new page queries.

    Thanks for helping work this out, and let me know if you have any other issues.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘After installing 1.5rc1, home page hijacked’ is closed to new replies.