Page MenuHomePhabricator

File with empty |link= parameter becomes undefined .. nullxnullpx
Closed, ResolvedPublic

Description

https://zh.wikipedia.org/?diff=27825404&oldid=26993245

A use tried to edit a template, but when he/she save his/her edit, it also break the image below which he/she haven't edit and it change the image into undefined.


Version: unspecified
Severity: normal

Details

Reference
bz51963

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 2:09 AM
bzimport set Reference to bz51963.

I was able to reproduce this bug altering the template under the text '维基数据'.

The media link changes without the user being involved.

https://zh.wikipedia.org/w/index.php?title=User:John_Vandenberg/MainPage&action=history

A simple test case

'.
[[File:Wikimedia-logo.svg|45px|center|link=]]'

change '.' to '..' and save.

or
https://en.wikipedia.org/w/index.php?title=User:John_Vandenberg/test&oldid=565743208&veaction=edit

Results:

  1. Image disappears
  2. Saving changes the result to:

'..
[[undefined|center|link=|nullxnullpx]]
'

The following round-trips fine at http://parsoid.wmflabs.org/_rtform/:

[[File:Wiki.png|45px|center|link=]]

This makes it likely that this is actually a VE issue. Moving to the VE component for investigation.

Change 79256 had a related patch set uploaded by Esanders:
Fix traversal for images with link=''

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

Change 79256 merged by jenkins-bot:
Fix traversal for images with link=''

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

This is now fixed in master (but images with link= will trigger a VE corruption warning - to be fixed tomorrow). It should be pushed to production in the next few days.

Change 79355 had a related patch set uploaded by Esanders:
Build link-less images with <span> not <a>

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

Change 79355 merged by jenkins-bot:
Build link-less images with <span> not <a>

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