Last modified: 2014-09-04 04:50:53 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T21410, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 19410 - Long gadget names cause problems in user_properties table
Long gadget names cause problems in user_properties table
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
Gadgets (Other open bugs)
unspecified
All All
: Normal enhancement (vote)
: ---
Assigned To: Nobody - You can work on this!
:
: 19245 21414 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-06-26 12:54 UTC by Carlos
Modified: 2014-09-04 04:50 UTC (History)
9 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Carlos 2009-06-26 12:54:52 UTC
...or the prefix used saving the preferences should be shortened. That's because in the new table "user_properties" the maximum key length is 32 bytes. There is already a gadget in eswiki ("herramienta-ver-subpaginas") that can't be saved because of this.

See bug 19408.
Comment 1 Chad H. 2009-06-26 13:47:44 UTC
Suggest WONTFIX. Making gadgets use shorter names is a good temporary workaround; however, bug 19408 should _eventually_ be fixed. Andrew said we wouldn't do it immediately, not that it wouldn't be done.
Comment 2 Siebrand Mazeland 2009-09-01 20:23:22 UTC
WONTFIX per comment 1.
Comment 3 Alexandre Emsenhuber [IAlex] 2009-11-07 21:23:07 UTC
*** Bug 21414 has been marked as a duplicate of this bug. ***
Comment 4 MZMcBride 2011-01-30 22:01:06 UTC
Re-opening this for now. I think 32 bytes is a reasonable key length. I think the system in which Gadgets rely on text prefixes should be re-examined. This seems prone to accidental overlap in the future and other nastiness.
Comment 5 Niklas Laxström 2011-01-30 22:04:05 UTC
Without prefix they could override other user preferences.
Comment 6 MZMcBride 2011-01-30 22:07:41 UTC
(In reply to comment #5)
> Without prefix they could override other user preferences.

I think I meant suffix, actually. The issue here is that _any_ text name-based key is going to cause problems here, as far as I know. The only way to get around this would be to make the key length 262 bytes (255 bytes for the maximum title length + 7 bytes for "gadget-"). But having such a length key doesn't seem like the right answer. Instead, it probably makes more sense to store these keys using an ID of some kind instead of the gadget name. That should eliminate the possibility of duplicate keys and truncation.
Comment 7 Bugmeister Bot 2011-08-19 19:12:23 UTC
Unassigning default assignments. http://article.gmane.org/gmane.science.linguistics.wikipedia.technical/54734
Comment 8 Kunal Mehta (Legoktm) 2014-09-02 08:07:56 UTC
Gadgets 2.0 enforces a 244-byte limit for names due to ResourceLoader::isValidModuleName...it appears that current Gadgets has the same restriction, but isn't enforcing it anywhere :/
Comment 9 Kunal Mehta (Legoktm) 2014-09-02 08:24:10 UTC
(In reply to Kunal Mehta (Legoktm) from comment #8)
> Gadgets 2.0 enforces a 244-byte limit for names due to
> ResourceLoader::isValidModuleName...it appears that current Gadgets has the
> same restriction, but isn't enforcing it anywhere :/

Fix for master in Change-Id: Ib74c0866bb333885c747d318418e2c8685ae339c.

After that's merged, I think we can consider this bug to be fixed with max length set to 244 bytes.
Comment 10 Gerrit Notification Bot 2014-09-02 12:27:25 UTC
Change 157792 had a related patch set uploaded by Alex Monk:
Check Gadget name is a valid ResourceLoader module name

https://gerrit.wikimedia.org/r/157792
Comment 11 Gerrit Notification Bot 2014-09-02 17:40:02 UTC
Change 157792 merged by jenkins-bot:
Check Gadget name is a valid ResourceLoader module name

https://gerrit.wikimedia.org/r/157792
Comment 12 Kunal Mehta (Legoktm) 2014-09-02 17:45:03 UTC
Gadget names are required to be a max of 244 bytes.
Comment 13 Alex Monk 2014-09-04 04:50:53 UTC
*** Bug 19245 has been marked as a duplicate of this bug. ***

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links