Page MenuHomePhabricator

Links in books throw errors on mobile (Uncaught ReferenceError: coll_clear_collection is not defined / Uncaught ReferenceError: coll_create_chapter is not defined)
Closed, ResolvedPublic

Description

On mobile it appears to be possible to reveal links which are hidden by default via user scripts however when clicked these throw errors https://he.m.wikipedia.org/wiki/%D7%9E%D7%99%D7%95%D7%97%D7%93:%D7%A1%D7%A4%D7%A8
It seems from the production logs at least one user is doing something along these lines.

I could replicate by the following:
In JS console run:

$('#collectionListContainer a').attr('style','')

Click "create chapter"
Uncaught ReferenceError: coll_create_chapter is not defined

Developer notes

Either this page should be blanked on mobile, or all the load should be loaded, warts and all.

Event Timeline

Change 960563 had a related patch set uploaded (by Thiemo Kreuz (WMDE); author: Thiemo Kreuz (WMDE)):

[mediawiki/extensions/Collection@master] Add safe-guards to fragile <a onclick="…"> triggers

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

Change 960563 merged by jenkins-bot:

[mediawiki/extensions/Collection@master] Replace fragile <a onclick="…"> triggers

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

Jdlrobson claimed this task.