Page MenuHomePhabricator

[Regression 1.25wmf14] HTML of JSON blocks (e.g. Schema pages) appears garbled
Closed, ResolvedPublic

Description

For some reason, only the top-level items are rendered properly.

See http://meta.wikimedia.org/wiki/Schema:Popups

My hunch is that it's a90b4c5809938701a3864979f38e518cc0c5aefa or e4f84af980c0e1054b7cf101c00b8c858dd6c562 (a90b4c5809938701a3864979f38e518cc0c5aefa could actually be a fix -- is it in wmf14?)

Details

Related Gerrit Patches:
mediawiki/extensions/EventLogging : wmf/1.25wmf14JsonSchemaContent: Fix html rendering of objects and arrays
mediawiki/extensions/EventLogging : wmf/1.25wmf15JsonSchemaContent: Fix html rendering of objects and arrays
mediawiki/extensions/EventLogging : masterJsonSchemaContent: Fix html rendering of objects and arrays

Event Timeline

ori created this task.Jan 14 2015, 10:33 AM
ori assigned this task to Nuria.
ori raised the priority of this task from to High.
ori updated the task description. (Show Details)
ori added a project: Analytics-EventLogging.
ori added subscribers: ori, Nuria, Milimetric and 2 others.

I can't reproduce this issue.

In MediaWiki core, on e.g. User:Root/foo.json (with https://gerrit.wikimedia.org/r/177172 applied), this works fine:

In EventLogging, on e.g. Schema:Edit, this works fine, too:

Ah, so those were pre-existing pages that I edited to invalidate any caches, but the page itself already existed. And that includes the content-model property of a page.

When creating a new page on latest MediaWiki, it is indeed broken. Verified it is caused by a90b4c58099. Works after reverting that. Reverted in master, and recommending backport in next SWAT.

Krinkle claimed this task.Jan 14 2015, 11:51 PM
Krinkle set Security to None.
Krinkle added a comment.EditedJan 15 2015, 12:00 AM

As @Nuria noticed, it only affecting new pages was the case for simple MediaWiki installs. But in production it did actually affect existing pages, too. This because $wgContentHandlerUseDB (which makes the content-model bound to a page) is disabled in WMF's mediawiki-config.

gerritbot added a subscriber: gerritbot.

Change 185096 had a related patch set uploaded (by Legoktm):
Fix display of Schema pages

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

Patch-For-Review

  • JsonContent was changed to return objects instead of assoc arrays, it also (unintentionally) broke the ability of extensions to extend JsonContent ("looked" fine in EL when creating a new page with $wgContentHandlerUseDB = true, MWException if it was false)
    • What was really happening was that new pages were being created with the JsonContent model instead of JsonSchema.
  • a90b4c58099 fixed the ability for extensions to extend JsonContent. This meant that pages would now be created as JsonSchema.
  • JsonSchema had a broken display due to changes of array -> object. It appeared that reverting a90b4c58099 fixed that, except it was really just creating pages as JsonContent.
  • My patch fixes an is_array -> is_object, which should fix the display.
Legoktm renamed this task from HTML of Schema pages appears garbled to HTML of Schema pages appears garbled [1.25wmf14 regression].Jan 15 2015, 12:35 AM
Legoktm added a project: Regression.
Legoktm added subscribers: Jdforrester-WMF, Krenair, Deskana.

Change 185096 merged by jenkins-bot:
JsonSchemaContent: Fix html rendering of objects and arrays

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

Change 185363 had a related patch set uploaded (by Ori.livneh):
JsonSchemaContent: Fix html rendering of objects and arrays

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

Patch-For-Review

Change 185364 had a related patch set uploaded (by Ori.livneh):
JsonSchemaContent: Fix html rendering of objects and arrays

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

Patch-For-Review

Change 185363 merged by Ori.livneh:
JsonSchemaContent: Fix html rendering of objects and arrays

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

Change 185364 merged by Ori.livneh:
JsonSchemaContent: Fix html rendering of objects and arrays

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

ori added a comment.Jan 16 2015, 2:07 AM

Thanks Timo.

Jdforrester-WMF renamed this task from HTML of Schema pages appears garbled [1.25wmf14 regression] to [Regression 1.25wmf14] HTML of JSON blocks (e.g. Schema pages) appears garbled.Jan 17 2015, 12:17 AM