Page MenuHomePhabricator

Create export script for converting hubs and lists to usable wikitext to allow for clean undeployment
Open, Needs TriagePublic

Description

If CK needs to be undeployed for whatever reason, we should have a quick way to render a simple, user-readable wikitext version out of the json as a new revisions, as well as convert all previous revisions to base content model (json).

This is important because:

  • Such a thing should not render the projects unreadable/unusable (as just dumping the raw json would)
  • Core currently throws exceptions upon nonexistent content models. (If this is fixed, no need to convert prior revisions, but we should still have the other thing.)

What it does:

  1. converts all old revisions with CK/CL contentmodels to json (no content loss, since it already is json internally, just handled special)
  2. creates new revision for current revision CK/CL contentmodel pages with it converted back into wikitext, a la specialconvercollaborationpagetowikitext/whatever - T192329 (obviously don't bother where it's only old revisions, but we still need to convert those per 1.)

Event Timeline

Just disabling it without doing any of that results in this:

[d1aae90463ab94abc336b693] /master/index.php/Project:WikiProject_example MWUnknownContentModelException from line 265 of /media/zephyrnia/mediawiki/core/includes/content/ContentHandler.php: The content model 'CollaborationHubContent' is not registered on this wiki.

Ideally someone implements T222672, and then while CK is still installed we could just extend that with some special handling to plug it into the same wikitext template as for T192329.

And if CK isn't installed anymore, then this would be precisely what the generic convert-anything maintenance script would be for anyway.