Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#11916 closed defect (bug) (fixed)

malformed redirect by wp-app.php when installed in an alternative directory

Reported by: mactijn's profile macTijn Owned by: josephscott's profile josephscott
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.1
Component: AtomPub Keywords: atompub
Focuses: Cc:

Description

I am getting a wrong redirect form wp-app.php when I have my wordpress install in an alternative directory.

Situation:

  • WordPress installed in $SITEROOT/wordpress/
  • cp $SITEROOT/wordpress/index.php $siteroot/index.php with include "fixed" as per instructions on codex
  • enabled Atom publishing feature

Current (defective) behavior:
when requesting $SITE/wordpress/wp-app.php I get a redirect to $SITE/wp-app.php/service

Expected behavior:
when requesting $SITE/wordpress/wp-app.php I get a redirect to $SITE/wordpress/wp-app.php/service

I have not seen or tested any other forms of Location-related bugs.

Attachments (1)

wp-app.patch (546 bytes) - added by macTijn 15 years ago.
patch to fix path error

Download all attachments as: .zip

Change History (11)

#1 @macTijn
15 years ago

  • Version changed from 2.9 to 2.9.1

#2 @macTijn
15 years ago

I found that all absolute href's in the /service document are wrong this way.

#3 @macTijn
15 years ago

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

...however, I spoke too fast. This seems to be fixed in trunk, according to https://core.trac.wordpress.org/changeset?old_path=/tags/2.9.1/wp-app.php&old=12730&new_path=/trunk/wp-app.php&new=12730

closing bug, pardon me for bothering.

@macTijn
15 years ago

patch to fix path error

#4 @macTijn
15 years ago

  • Resolution invalid deleted
  • Status changed from closed to reopened

spoke too soon. added patch that fixes it.

#5 @josephscott
15 years ago

This patch looks good, fixed the problem in my tests.

Though I'm not sure why you'd request wp-app.php by itself, the AtomPub RSD entry lists wp-app.php/service as the end point.

#6 @nacin
15 years ago

This should be home_url() which should allow us to clean out that old HTTPS check. (Which otherwise should be replaced with is_ssl()).

#7 @josephscott
15 years ago

There are likely several items in wp-app.php that could be brought up to speed with current WP methods. That should probably be addressed in a separate ticket (likely more than one) instead of adding them all here.

#8 @mactijn
15 years ago

wp-app.php/service also lists the wrong URL's in the XML, so wether I'm requesting $site/$wp-dir/wp-app.php directly is really besides the point.

#9 @nacin
15 years ago

  • Milestone changed from Future Release to 3.0

I've changed this code in [13427]. Changing home_url() to site_url() makes to me here sense.

#10 @nacin
15 years ago

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

(In [14136]) Switch to site_url() as wp-app base. fixes #11916

Note: See TracTickets for help on using tickets.