Opened 13 years ago
Closed 13 years ago
#15841 closed defect (bug) (fixed)
Press This: Added images when using Press This are sourced incorrectly
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | major | Version: | 3.1 |
Component: | Press This | Keywords: | has-patch dev-reviewed |
Focuses: | Cc: |
Description
Tested and verified in r16936.
Pulling an image from a source used when invoking Press This should return the image path itself in the post content and the image should be linked to its associated attachment page, but instead is sourcing the attachment page and is linking to the original article, like the following example.
The source document in this code snippet below is http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior
<div class="entry-content"> <p> </p> <p style="text-align: center;"><a href="http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior"><img src='http://26mag.com/?attachment_id=3754' alt='' /></a></p> <p><a href="http://gameinternals.com/post/2072558330/understanding-pac-man-ghost-behavior">GameInternals – Understanding Pac-Man Ghost Behavior</a>.</p> </div>
To reproduce:
- Open an article on another site.
- Invoke your Press This bookmarklet.
- Add an image from the source article by using the media tools in the Press This window.
- Draft the post.
- Preview the post and check source. The image will appear as a 404 (since the attachment page doesn't return an image file).
Attachments (2)
Change History (7)
#1
@
13 years ago
- Summary changed from Press This: Added images when using Press This are sourced and linked incorrectly to Press This: Added images when using Press This are sourced incorrectly
#2
@
13 years ago
- Keywords has-patch added
- Milestone changed from Awaiting Review to 3.1
The change to media_sideload_image
as part of the changes in media_handle_sideload
in [16383] for #15432 seems to incorrectly use get_attachment_link
. Instead wp_get_attachment_url
is what is wanted for the img tag's src attribute.
Noticing some extra non-breaking spaces when inserting the image which appears to be breaking the link on the default text, but for another ticket.
I checked the old behavior again and the images are supposed to link back to the original article, but the sourcing is still bad. Modifying the ticket summary to be more accurate and please strike my comments on the linking from the above.
This is what happens when I make assumptions.