Page MenuHomePhabricator

SemanticForms lies about content model (Title::getContentModel gives wikitext, yet it is json)
Closed, InvalidPublic

Description

Clicking "Edit" (VisualEditor) on https://wikitech.wikimedia.org/wiki/Shell_Request/Rxy shows an error from the server about content model json being incompatible.

However VisualEditor shouldn't initialise that far in the first place, we know the content model (conf.wgPageContentModel).


Version: unspecified
Severity: normal

Details

Reference
bz62576

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:03 AM
bzimport set Reference to bz62576.

Hm... Looks like a bug with Semantic MediaWiki.

It is exporting mw.config wgPageContentModel = 'wikitext', and yet when you really ask it it admits its JSON.

mw.config.get( 'wgPageContentModel' );

< "wikitext"

click "Edit"
< AJAX Eror
{

.. Exception Caught: The content format json is not supported by the content model wikitext.

OutputPage.php exports:

'wgPageContentModel' => $title->getContentModel(),

Well, "lies" is a strong word. :) What makes you think this problem comes from Semantic Forms? Is it just the fact that the page uses a form?

Also, you wrote, "it admits its JSON", meaning that the page really holds JSON but claims that it's holding wikitext. Isn't the problem the other way around?

(In reply to Yaron Koren from comment #3)

Well, "lies" is a strong word. :) What makes you think this problem comes
from Semantic Forms?

The wiki uses Semantic MediaWiki, and this is FormEdit-able page (Special:Formedit). That's Semantic Forms, right?

Or is the turning the page itself into semantic data done (json content model) done by another Semantic extension and Semantic Forms only provides the special page and edit button?

Yes, Semantic Forms only provides the edit button/page - it doesn't affect the actual content page. If any SMW-related extension is causing this error, I would assume it's Semantic MediaWiki itself.

I'm marking this as "invalid" - I would change the component to Semantic MediaWiki, but that's not longer on Bugzilla. If you want to submit it as an SMW bug, you need to go to the SMW GitHub page.

(In reply to Yaron Koren from comment #6)

I'm marking this as "invalid" - I would change the component to Semantic
MediaWiki, but that's not longer on Bugzilla. If you want to submit it as an
SMW bug, you need to go to the SMW GitHub page.

Since the bug was filed it appears the page linked has been converted to actually be wikitext-based – Krinkle, can we leave this closed or do we need to raise a GitHub issue?

(I note that it is actually wikitext, not JSON, content; perhaps us having a year-old version of SMW doesn't help.)