Page MenuHomePhabricator

Add page and file import support
Open, NormalPublic

Description

Narrative

As a developer, I can set up test wikis easily, without having to import a hundred templates / upload test images / etc. by hand

Acceptance Criteria

  • Add a puppet command to import an XML file created with Special:Export when a role is enabled (you can use importDump.php)
  • it should also import the images mentioned in the XML file (importImages.php)
  • come up with a convention of were these files should be stored and where their purpose can be described (multiple roles might want to share the same dump; one role might want to import multiple dumps), whether they should be gzipped etc. Create an example that others can copy (e.g. the template shims for CommonsMetadata)
  • There is no great way to check if the file has been imported already, esp. when the role gets disabled/reenabled; skipping existing pages, or just overwriting them, is acceptable.

Event Timeline

Gilles created this task.EditedNov 26 2014, 4:59 PM
Gilles claimed this task.
Gilles raised the priority of this task from to Normal.
Gilles updated the task description. (Show Details)
Gilles changed Security from none to None.
Gilles added a subscriber: Gilles.

Gergo said:

From https://www.mediawiki.org/wiki/Typography_refresh/Retrospective , sounds like a nice use case:

Nick put this together in November [officewiki listing of browsertesting tools]; he suggested that the design team might consider putting together (over the long-term) a long list of "100+ examples pages, that we internally use as test-beds, to highlight the Extremes, the Edge Cases, and the Exemplars: From English FAs and stubs and docs, to Chinese Wikivoyage Discussion Boards, to Wikidata, to Wikisource, to ...."

The E2E page is now imported for the MMV role, the rest of the templates needs by UW are blocked on two bugs.

Gilles removed Gilles as the assignee of this task.Dec 2 2014, 9:30 AM
dduvall moved this task from Backlog to In Progress on the MediaWiki-Vagrant board.Jan 9 2015, 8:41 PM
Gilles moved this task from Next up to Prototyping on the Multimedia board.Jan 14 2015, 4:34 PM
Gilles moved this task from Prototyping to Untriaged on the Multimedia board.Apr 6 2015, 9:21 AM
Jdforrester-WMF moved this task from Untriaged to Backlog on the Multimedia board.Sep 4 2015, 6:25 PM
Restricted Application added a subscriber: Matanya. · View Herald TranscriptSep 4 2015, 6:25 PM

IIRC there is now a role that imports some content into the wiki, is this report still current?

Tgr added a subscriber: Tgr.May 8 2017, 9:59 AM
  • Add a puppet command to import an XML file created with Special:Export when a role is enabled (you can use importDump.php)

mediawiki::import::dump. There is also vagrant import-dump <something.xml> if you would rather do it manually.

There is also mediawiki::import::url for importing live wiki content. It does not support importing files.

  • it should also import the images mentioned in the XML file (importImages.php)

vagrant import-dump calls importDump.php --uploads which presumably takes care of it. mediawiki::import::dump doesn't.

  • come up with a convention of were these files should be stored and where their purpose can be described (multiple roles might want to share the same dump; one role might want to import multiple dumps), whether they should be gzipped etc. Create an example that others can copy (e.g. the template shims for CommonsMetadata)

That didn't happen AFAIK; only a few roles use dump import at all (gwtoolset, multimediaviewer, wikitech, articleplaceholder, labs_initial_content).

  • There is no great way to check if the file has been imported already, esp. when the role gets disabled/reenabled; skipping existing pages, or just overwriting them, is acceptable.

mediawiki::import::dump checks a sentinel page and imports nothing if that page exists, overwrites existing pages if it does not. vagrant import-dump just overwrites stuff.