Make WordPress Core

Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#14088 closed defect (bug) (fixed)

Don't return 404 in backend

Reported by: nacin's profile nacin Owned by: frankperez87's profile frankperez87
Milestone: 3.0.1 Priority: normal
Severity: major Version: 3.0
Component: Administration Keywords: has-patch dev-feedback
Focuses: Cc:

Description

http://wordpress.org/support/topic/415526

Trash all of your posts. wp-admin/edit.php sends a 404 header. In 2.9, this was a 200 header. Even though no posts are found, I don't see a reason for a 404 header in the backend.

Attachments (2)

14088.diff (338 bytes) - added by frankperez87 13 years ago.
14088.2.diff (687 bytes) - added by nacin 13 years ago.

Download all attachments as: .zip

Change History (10)

#1 @nacin
13 years ago

  • Severity changed from normal to major

This can cause some server issues. Someone reported some nginx issues.

@frankperez87
13 years ago

#3 @frankperez87
13 years ago

  • Keywords has-patch dev-feedback added
  • Owner set to frankperez87
  • Status changed from new to accepted
  • Version set to 3.0

Changed the handler for the query in post.php to use query_posts and that did the trick.

#4 @nacin
13 years ago

We also use wp() in wp_edit_attachments_query(), which affects upload.php.

I'm trying to think of what would change by going from wp() to query_posts() (as it has been wp() for some time), and whether it makes sense to repair our regressed logic in the handler instead. I wonder if that is as simple as an !is_admin() check.

#5 @frankperez87
13 years ago

Since the only thing that was really being used by that line was a query handling for the array $query changing it to query_posts should not affect the other parts of the system. One of the differences i have noticed is in the headers that are sent out. I could look into the wp function and get down to the line that is causing it, but query_posts works just fine. Let me know.

#6 @ryan
13 years ago

That patch is likely a good way to go, but I'm worried about unintended consequences. The !is_admin() check suggested by nacin seems safer for 3.0.1.

@nacin
13 years ago

#7 @nacin
13 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [15409]) Don't throw 404 in the backend. fixes #14088 for trunk.

#8 @nacin
13 years ago

(In [15410]) Don't throw 404 in the backend. fixes #14088 for 3.0.

Note: See TracTickets for help on using tickets.