Page MenuHomePhabricator

Converting an error image (red link) from block to inline loses its error state
Closed, ResolvedPublic1 Estimated Story Points

Description

Edit an inline error image and change it to 'thumbnail', it renders as a normal image, not with the red linked title.

The offending code is in ve.ui.MWMediaDialog lines 1243-1269. In the else block (1255) we remove the old image and create a new one using this.imageModel.insertImageNode. This new image always has no error flag set due to line 452 of ve.dm.MWImageModel, however we should check that the src has changed before making this assumption. We check the src has changed on line 1250 of ve.ui.MWMediaDialog, so we can reuse that logic.

Event Timeline

Esanders assigned this task to SuchetaG.
Esanders raised the priority of this task from to Needs Triage.
Esanders updated the task description. (Show Details)
Esanders added a project: VisualEditor.
Esanders subscribed.

Change 218656 had a related patch set uploaded (by SuchetaG):
Converting an error image (red link) from block to inline does not lose its error state

https://gerrit.wikimedia.org/r/218656

Jdforrester-WMF triaged this task as Medium priority.
Jdforrester-WMF edited a custom field.

Change 218656 merged by jenkins-bot:
Converting an error image (red link) from block to inline does not lose its error state

https://gerrit.wikimedia.org/r/218656