Make WordPress Core

Opened 9 years ago

Closed 9 years ago

#33293 closed defect (bug) (fixed)

Editor: Editing the URL of an image in visual editor removes the image.

Reported by: obenland's profile obenland Owned by: iseulde's profile iseulde
Milestone: 4.3 Priority: high
Severity: major Version: 4.3
Component: Editor Keywords: has-patch commit
Focuses: Cc:

Description

Using the visual editor: if you edit the URL of an image with the "Link" tool in the TinyMCE toolbar, the image is removed and the plain URL is displayed instead.

Screen cast to show the issue - ​http://quick.as/4n4zcbxqb

To reproduce:

  1. Create a new post
  2. Click "Add Media" and insert an image -- under "ATTACHMENT DISPLAY SETTINGS" make sure the image will have a link of some sort.
  3. Once inserted to the post, click the image once to select it.
  4. Click "Insert/Edit link" button in TinyMCE toolbar.
  5. Type or paste a URL, hit Enter and click "Update"
  6. Watch image disappear and be replaced by the bare URL.

Attachments (1)

33293.patch (483 bytes) - added by azaozz 9 years ago.

Download all attachments as: .zip

Change History (8)

#1 @obenland
9 years ago

  • Owner set to iseulde
  • Status changed from new to reviewing

This ticket was mentioned in Slack in #core by obenland. View the logs.


9 years ago

This ticket was mentioned in Slack in #core-editor by azaozz. View the logs.


9 years ago

@azaozz
9 years ago

#4 @azaozz
9 years ago

Caused by using the URL when link text is empty. In 33293.patch: use the URL only when the link text field is used.

#5 @iseulde
9 years ago

  • Keywords has-patch added; needs-patch removed

Looks good.

#6 @helen
9 years ago

  • Keywords commit added

Looks good.

#7 @markjaquith
9 years ago

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

In 33591:

Only use a bare URL when the link text field is used.

Fixes bug that would remove images on edit, in some circumstances.

fixes #33293
props azaozz

Note: See TracTickets for help on using tickets.