Last modified: 2014-06-05 17:56:49 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 T62089, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60089 - TemplateData: TemplateDataGenerator should roundtrip unexpected JSON values
TemplateData: TemplateDataGenerator should roundtrip unexpected JSON values
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
TemplateData (Other open bugs)
master
All All
: High normal (vote)
: ---
Assigned To: Moriel Schottlender
: javascript
Depends on:
Blocks: td-gui-stable
  Show dependency treegraph
 
Reported: 2014-01-15 15:38 UTC by Ltrlg
Modified: 2014-06-05 17:56 UTC (History)
3 users (show)

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


Attachments

Description Ltrlg 2014-01-15 15:38:33 UTC
This editor replaces multi-language InterfaceText ([[mw:Extension:TemplateData#InterfaceText]]) by "[object Object]"…
Comment 1 Krinkle 2014-05-20 19:12:45 UTC
Making bug more generic. If it is too generic (e.g. requires more than one good commit to fix), feel free to undo and file a separate one for the general round-tripping issue.
Comment 2 Gerrit Notification Bot 2014-05-27 16:25:32 UTC
Change 133944 had a related patch set uploaded by Jforrester:
Block object descriptions from edit

https://gerrit.wikimedia.org/r/133944
Comment 3 Gerrit Notification Bot 2014-06-05 00:38:23 UTC
Change 133944 merged by jenkins-bot:
Block object descriptions from edit

https://gerrit.wikimedia.org/r/133944
Comment 4 James Forrester 2014-06-05 00:38:42 UTC
Now fixed for descriptions, but not (I think?) in general.
Comment 5 Krinkle 2014-06-05 17:54:32 UTC
(In reply to James Forrester from comment #4)
> Now fixed for descriptions, but not (I think?) in general.

(In reply to Gerrit Notification Bot from comment #3)
> Change 133944 merged by jenkins-bot:
> Block object descriptions from edit
> 
> https://gerrit.wikimedia.org/r/133944

This commit originally ensured 'description' properties that contain objects are left untouched.

It was changed in later patch versions to ensure all properties containing non-string values (and non-arrays for 'aliases' properties) are left untouched.

This isn't a very scalable solution (we already have 4 different value types, ideally we'd map them strictly to the property name as validation instead of compressed in a catch-all if/else statement like this).

The only property it currently may not roundtrip properly are the boolean properties ('required' is forced into a boolean regardless of its value, 'deprecated' is untouched, usually..?). Though this is not as much of an issue since we already validate these when saving the page on the server-side. So these would only get messed up when the user edits them in the wikitext area, then proceeds to click "Manage template data". A valid use case (the editor should not rely on server-side validation after saving), but low priority.
Comment 6 James Forrester 2014-06-05 17:56:49 UTC
OK, in that case I'm marking this bug closed (but we should follow-up with the wider tech debt, indeed).

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


Navigation
Links