Ticket #9147 (closed defect (bug): fixed)

Opened 3 years ago

Last modified 2 years ago

AtomPub return incorrect "edit" link

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

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

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

Change History

  • 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   ryan3 years ago

  • Component changed from General to AtomPub

comment:3   ryan3 years ago

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

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

comment:4   ryan3 years ago

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

Note: See TracTickets for help on using tickets.