WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 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:

Description

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 5 years ago.

Download all attachments as: .zip

Change History (5)

josephscott5 years ago

comment:1 josephscott5 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.

comment:2 ryan5 years ago

  • Component changed from General to AtomPub

comment:3 ryan5 years ago

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

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

comment:4 ryan5 years ago

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

Note: See TracTickets for help on using tickets.