WordPress.org

Forums

Simply Exclude
v2.0.3 results in Error 500 under PHP/Apache (10 posts)

  1. MomDad
    Member
    Posted 3 years ago #

    Just an FYI in case you weren't aware -- v2.0.3 that was pushed out yesterday (2012-03-18) has breaking changes that result in Error 500 under PHP/Apache. The site was fine with v2.0.2, but immediately after updating to v2.0.3 the site is broken. Disabling the plugin allows the site to work again. Anyway, it's a great plugin, Paul, and I look forward to a fix so I can re-enable it!

    http://wordpress.org/extend/plugins/simply-exclude/

  2. Paul Menard
    Member
    Plugin Author

    Posted 3 years ago #

    Please provide more information about how you are using the plugin. Also what other plugins you are running.

  3. MomDad
    Member
    Posted 3 years ago #

    I've responded on your blog, but I'll post it here as well for other people's reference on the issue:

    [Mon Mar 19 16:17:21 2012] [warn] [client 0.0.0.0] mod_fcgid: stderr: PHP Fatal error: Call to undefined function is_main_query() in /home/www/domain.com/wp-content/plugins/simply-exclude/simplyexclude.php on line 1913, referer: http://domain.com/wp-admin/plugins.php?activate=true&plugin_status=all&paged=1&s=
    (note: mod_fcgid logs all PHP errors as "warn" level, regardless of their actual severity -- and in this case, it's actually a Fatal PHP error [as noted beside "stderr:"])

    Fatal PHP errors result in display of an Error 500 under Apache -- so I'm 100% correct in what I reported ;)

    The is_main_query() function is new as of WordPress v3.3 (http://codex.wordpress.org/Function_Reference/is_main_query), so it breaks compatibility for anyone on a lower version. Currently, your plugin is listed as requiring v3.2 or higher (I'm on v3.2.1).

    I'm fine with reverting to v2.0.2 or holding off on re-activating it until I make the move to WP v3.3+ -- not ready/able to just yet. It'd be great though if you could manage to rework it to have compatibility with <v3.3 for all of us who are, for whatever reason, a couple versions behind.

  4. Paul Menard
    Member
    Plugin Author

    Posted 3 years ago #

    Thanks for the full details of the error. I have some other changes from users today and will be including this fix in the upcoming release. Can I ask that you beta test the code before I submit to the WordPress repo??

  5. Paul Menard
    Member
    Plugin Author

    Posted 3 years ago #

    Ok. here is what I don't understand. The is_main_query is wrapped with the correct version_compare logic. The code section is below. So the IF is supposed to trap those versions lower than '3.3.0' and direct then to the else part.

    if ( version_compare( $wp_version, '3.3.0', '<' ) ) {

    global $wp_the_query;
    if ($wp_the_query !== $query)
    return $query;
    } else {
    if (!is_main_query())
    return $query;
    }

    I've tested this on my own wp 3.2 and 3.2.1 and works as expected. Strange.

  6. Paul Menard
    Member
    Plugin Author

    Posted 3 years ago #

    Would appreciate a review of the beta for 2.0.4 This version explicitly checks for the function 'is_main_query'.

    http://dl.dropbox.com/u/2616987/projects/wp-plugins/simply-exclude/simply-exclude-2.0.4Beta1.zip

    I've also added a new UI panel on the Settings page. The plugin was designed to only filter on the main page loop. So it will be default ignore the nav, wp_list_pages, and other template queries.

  7. MomDad
    Member
    Posted 3 years ago #

    I'll gladly test it, unfortunately DropBox is inaccessible from here (blocked at the ISP level even through web proxy). If you can put the zip somewhere else (e.g. uploading.com), I'll give it a try.

  8. Paul Menard
    Member
    Plugin Author

    Posted 3 years ago #

  9. MomDad
    Member
    Posted 3 years ago #

    Thanks, Paul! I'll give it a go and report back on how it fares.

  10. MomDad
    Member
    Posted 3 years ago #

    Works great! Thanks for so quickly resolving this, Paul.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Simply Exclude
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic