Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#15195 closed defect (bug) (fixed)

wp-links-opml.php has status 404

Reported by: dbt's profile dbt Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version: 3.1
Component: General Keywords:
Focuses: Cc:

Description

The HTTP status code is incorrect. However, the content looks fine! I'm confused -- is this possibly related to permalinks canonicalization?

Change History (6)

#1 @dbt
14 years ago

terrible workaround:

if ( empty($wp) ) {

require_once('./wp-load.php');
wp();

}

+header('HTTP/1.1 200 OK');

header('Content-Type: text/xml; charset=' . get_option('blog_charset'), true);

#2 @Viper007Bond
14 years ago

  • Version set to 3.1

Confirmed on trunk 15923.

#3 @dd32
14 years ago

(In [15926]) Do not use deprecated argument in wp-links-opml.php. See #15195

#4 @dd32
14 years ago

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

(In [15928]) Do not Query for posts on OPML exports, Fixes OPML export script 404'ing due to no pages matching 'wp-links-opml.php'. Fixes #15195

#5 @dd32
14 years ago

  • Milestone changed from Awaiting Review to 3.1

I couldn't see any reason why wp() needed to be called here.

The script is not secured in any way, and only needs Taxonomy/Link access.

The 404'ing was caused by WP_Query looking for a page slug of 'wp-link-opml.php' which obviously doesnt exist. Not querying for posts also removes 2 useless SQL queries, bringing the page to 3 required SQL queries.

#6 @dbt
14 years ago

thanks, these two patches work perfectly.

Note: See TracTickets for help on using tickets.