Make WordPress Core

Opened 19 years ago

Closed 19 years ago

#6428 closed defect (bug) (fixed)

File URL option inserts wrong code into post

Reported by: moshu Owned by:
Priority: high Milestone: 2.5
Component: Administration Version: 2.5
Severity: blocker Keywords: image upload has-patch
Cc: Focuses:

Description

When you are on the Add Image popup and get an image uploaded or selected from the media library, there is an option called Link URL. It has 3 preset options:

None
File URL
Post URL

None - works as expected.
However, the File URL which should make the image linked directly to the image file, results in the same as Post URL: the click goes to the "attachment" view, creating/having an URL like
example.com/?attachment_id=XX

instead of what is displayed in the field when selecting "File URL":
example.com/wp-content/uploads/2008/03/mypic.jpg

I would expect that selecting "File URL" would result in an image displayed in the post AND having a direct link to the image file itself.

Tested on a local install (XAMPP v.1.4.12)
Apache 2.0.53
PHP 5.0.3

Attachments (1)

6428.diff​ (603 bytes ) - added by andy 19 years ago.
do not add rel if link is not get_attachment_link

Download all attachments as: .zip

Change History (4)

#1 @moshu
19 years ago

  • Component General → Administration
  • Severity normal → major

@andy
19 years ago

do not add rel if link is not get_attachment_link

#2 @andy
19 years ago

  • Keywords has-patch added; URL removed
  • Priority normal → high
  • Severity major → blocker

#3 @ryan
19 years ago

  • Resolution → fixed
  • Status new → closed

(In [7557]) do not add rel if link is not get_attachment_link. Props andy. fixes #6428

Note: See TracTickets for help on using tickets.