Page MenuHomePhabricator

Gadgets 2.0: "hidden" doesn't work
Closed, ResolvedPublic2 Estimated Story Points

Description

From
https://www.mediawiki.org/wiki/Thread:Talk:ResourceLoader/V2_testing/Unable_to_hide_a_gadget

The "hidden" option is not working for this gadget[1]. It appears on [2] even after I hide it[3]. Indeed, the loop[4] which adds a preference for each gadget doesn't check for its hidden property before adding it to Special:Preferences (BTW: it also doesn't check if the user has the appropriate rights).

[1] http://rl2.wmflabs.org/rl2-repo1/wiki/Gadget_definition:test.js
[2] http://rl2.wmflabs.org/rl2-repo1/wiki/Special:Preferences#mw-prefsection-gadgets Special:Preferences#mw-prefsection-gadgets
[3] http://rl2.wmflabs.org/rl2-repo1/w/index.php?title=Gadget_definition:test.js&diff=prev&oldid=462
[4] https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/extensions/Gadgets.git;a=blob;f=Gadgets.hooks.php;hb=refs/heads/RL2#l305

Details

Reference
bz39025

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 12:56 AM
bzimport set Reference to bz39025.
bzimport added a subscriber: Unknown Object (MLST).

Confirming that this bug is still present.

DannyH set Security to None.
DannyH subscribed.

For CommTech: We should test this after these tickets are done:

T106177: Implement Gadget and Gadget definition namespaces plus their content models
T31398: Implement Gadget Manager

Legoktm expects that this is already fixed; we just need to make sure, and close the ticket.

kaldari raised the priority of this task from Low to Medium.Feb 2 2016, 6:19 PM
kaldari edited projects, added Community-Tech-Sprint; removed Community-Tech.
kaldari edited a custom field.
kaldari claimed this task.
kaldari subscribed.

Confirmed fixed on http://commtech.wmflabs.org (which is running the code at https://gerrit.wikimedia.org/r/#/c/247869/)