Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#14705 closed defect (bug) (invalid)

[15531] breaks is_*() conditional tags

Reported by: freddyware's profile freddyware Owned by:
Milestone: Priority: normal
Severity: critical Version:
Component: Query Keywords:
Focuses: Cc:

Description

#14494 suggested moving the is_*() conditional tags into the WP_Query class and [15531] changed trunk/wp-includes/query.php to redirect those calls to the global $wp_query object.

However, it appears that this move has broken at least one of the conditional tags because $wp_query isn't known -- this is the error:

Fatal error: Call to a member function is_feed() on a non-object in /home/frederickd/frederickding.com/wordpress/wp-includes/query.php on line 270

See line 270.

Right now I am experiencing this critical error on the homepage of a site running trunk.

Attachments (1)

is_feed_broken-20100826.png (109.8 KB) - added by freddyware 13 years ago.
is_feed() creates a critical error that stops execution.

Download all attachments as: .zip

Change History (6)

@freddyware
13 years ago

is_feed() creates a critical error that stops execution.

#1 @ryan
13 years ago

Is the theme calling is_feed() before $wp_query is created?

#2 @ryan
13 years ago

  • Milestone changed from Awaiting Review to 3.1

#3 @freddyware
13 years ago

  • Keywords needs-patch removed

Aha. I did a debug_backtrace() and found that the violating line was in the W3 Total Cache plugin, which calls is_feed() on line 807 of w3-total-cache/lib/W3/Plugin/Minify.php.

While I recognize that this is now a bug in a plugin and not core, it seems problematic that this core commit breaks W3 Total Cache. I guess I now have to ... disable the caching plugin.

Is there any way that this move can be made more backward-compatible?

#4 @scribu
13 years ago

  • Milestone 3.1 deleted
  • Resolution set to invalid
  • Status changed from new to closed

This change only makes the error in W3 Total Cache more apparent. Previously, it would have triggered a notice, which normally isn't displayed.

So this is actually a good oportunity for the plugin author to fix the code.

#5 @nacin
13 years ago

Going to manage the side effects of [15531] in #14729.

Note: See TracTickets for help on using tickets.