Page MenuHomePhabricator

import into Schema: namespace failed with content model error
Closed, DeclinedPublic

Description

On meta-wiki (where I have staff rights) I did Special:Export of Schema:OpenTask including its history, modified the page's name in the XML to CommunityPortal (a new page name), and then tried Special:Import. The page printed

Importing pages...
  Schema:CommunityPortal 8 revisions

followed by the red error text:

Import failed: Can't save non-default content model with  $wgContentHandlerUseDB disabled: model is wikitext , default for  Schema:CommunityPortal is JsonSchema

The Schema namespace implemented by Extension:EventLogging is using a non-default content model of JsonSchema, so the model here should not be "wikitext".

I think this message comes from core/includes/Revision.php's checkContentModel() called by its insertOn() method which is invoked by the call $nullRevision->insertOn() in SpecialImport.php. I suspect the problem is not in the EventLogging extension, but rather Revision.php is not correctly determining the content format for the new page that will hold the imported content.

... After going to the trouble of writing this bug report, I checked and https://meta.wikimedia.org/wiki/Schema:CommunityPortal was created with seemingly all the history, so the error message is in error -- the import succeeded.


Version: unspecified
Severity: minor

Details

Reference
bz43279

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:57 AM
bzimport set Reference to bz43279.

This is such an impossibly niche need -- I'm not going to chase this down, sorry. Just copy/paste schemas you need in dev. (Or set Metawiki to be your remote schema wiki.)

[moving from MediaWiki extensions to Analytics product - see bug 61946]