Page MenuHomePhabricator

VE adding empty link param to galleries, images unclickable
Closed, ResolvedPublicBUG REPORT

Description

It looks like VE is adding empty link= params to gallery images, which then become unclickable and are lost from the sequence of images in full screen Media Viewer.

Here, gallery was created manually with two images, then two more images were added from VE.

Steps to replicate the issue (include links if applicable):

  • Edit a page with the visual editor
  • Use the Insert option
  • Use the gallery option
  • Insert a gallery of images

What happens?:

  • The images are not clickable, as the visualeditor includes an empty link= parameter on their markup

What should have happened instead?:

  • The images should be able to be followed
  • The |link= parameter was never requested and should not be inserted

Software version (skip for WMF-hosted wikis like Wikipedia):
production wmf

Other information (browser name/version, screenshots, etc.):
Example edit: https://test.wikipedia.org/w/index.php?title=VE_gallery_empty_link&diff=583647&oldid=583646

Event Timeline

@Arlolra Is this a plausible side-effect of the recent round-tripping changes for T348703?

Xaosflux updated the task description. (Show Details)
Xaosflux added a project: Regression.

Users report this worked without issue in the past, tagging as regression

Change 978102 had a related patch set uploaded (by DLynch; author: DLynch):

[mediawiki/extensions/VisualEditor@master] Fix Gallery images always having |link=| and |alt=|

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

Change 978102 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Fix Gallery images always having |link=| and |alt=|

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

QA note: you should be able to test this by just viewing the "review changes" diff from the save dialog. There's no way to set the link parameter from inside VE, but with this patch it should just leave alone whatever someone has set it to in the source.

Note, this was being caused during initial gallery creations, not just during changes to existing source. Be sure to validate that in the QA.

Not the task for this, but why does an empty link= parameter render the file unclickable? Shouldn't it verify that there is something in the parameter?

Not the task for this, but why does an empty link= parameter render the file unclickable? Shouldn't it verify that there is something in the parameter?

There are use cases for unclickable images, for example ones used as controls/buttons (along with public domain images that don't require attribution).

There are use cases for unclickable images, for example ones used as controls/buttons (along with public domain images that don't require attribution).

The problem isn't with images that don't require attribution, but with not being able to see them in the media viewer.
I don't find it very user-friendly that the absence of a value for a parameter still has a value (i.e. the full image is not available).

A very simple way of solving this problem would be to add a `-` value instead of no value and that enlarging the image is not desired.
Of course this would make all the purposely empty values useless, but most of them are not empty because the image is not to be enlarged.
I've edited dozens of articles and I can say that this is almost never the case, just as icons that don't need to be enlarged don't have an empty link parameter, simply because the average contributor has no idea that such a system exists, despite the fact that it was put in place to simplify things, even though it causes more problems than it solves.

VPuffetMichel subscribed.

verified in QA, resolving this.