Make WordPress Core

Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#9147 closed defect (bug) (fixed)

AtomPub return incorrect "edit" link

Reported by: tarmes Owned by: josephscott
Milestone: 2.7.2 Priority: normal
Severity: normal Version: 2.7
Component: AtomPub Keywords: has-patch
Focuses: Cc:


The 'edit' URL returned by Wordpress when uploading *images* is incorrect. POSTing the image will return something like this:

<link rel="edit-media"

href="http://www.myblog.com/blog/wp-app.php/attachment/file/491" />

<link rel="edit" href="http://www. myblog.com/blog/wp-app.php/post/491" />

The edit media URL is correct, however if I do a GET of the edit URL, to retrieve the metadata, the result is empty. After looking at the source I realised that it should have been returning this:

<link rel="edit" href="http://www. myblog.com/blog/wp-app.php/attachment/491" />

With this URL the GET works

Attachments (1)

wp-app.php.diff (490 bytes) - added by josephscott 9 years ago.

Download all attachments as: .zip

Change History (5)

#1 @josephscott
9 years ago

  • Cc joseph@… added
  • Keywords has-patch added
  • Owner changed from anonymous to josephscott

Added a patch to make sure that media files reference /wp-app.php/attachment/XXXX instead of /wp-app.php/post/XXXX that fixes it both for the media collection listing and the individual entry listing.

#2 @ryan
9 years ago

  • Component changed from General to AtomPub

#3 @ryan
9 years ago

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

(In [10651]) Return correct edit link. Props josephscott. fixes #9147

#4 @ryan
9 years ago

(In [10652]) Return correct edit link. Props josephscott. fixes #9147 for 2.7

Note: See TracTickets for help on using tickets.