Last modified: 2014-08-13 23:37:28 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T48869, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 46869 - Create sample pages for new MW
Create sample pages for new MW
Status: NEW
Product: MediaWiki-Vagrant
Classification: Unclassified
General (Other open bugs)
unspecified
All All
: Normal enhancement
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-04-03 23:08 UTC by Yuri Astrakhan
Modified: 2014-08-13 23:37 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Yuri Astrakhan 2013-04-03 23:08:09 UTC
When initializing a new MW database (this should not happen if database already exists and needs to be updated), vagrant should create a set of test pages to work with.

Based on my past experiences, I would recommend about 15 regular pages, some in non 0 namespace, at least 2 templates (one - nested), some categories, and possibly an image file or two.  Most edits should be done as if by the administrator, plus a few - by anonymous user. All pages should at least be linked from the main page. Some pages should be watched by admin.

In short, the wiki should not be pristine, allowing for all sorts of functionality instantly testable without page creation.
Comment 1 Andre Klapper 2013-09-11 22:46:10 UTC
[mass-moving from Tools>MediaWiki-Vagrant to separate product. See bug 54041. Filter bugmail on this comment.]
Comment 2 Yuri Astrakhan 2014-08-13 06:14:20 UTC
A much more flexible solution: create new wiki pages based on files in the wikiPages\ directory.

Use filename as the article title. The filename should be URL-decoded first, e.g. Talk%3ABlah would create a page "Talk:Blah".  Additionally, directories should be used as namespaces (I don't think we should use directories as sub-pages, i.e. Page/SubPage, as this is a rarely used feature).

Files will need additional processing - all files in a directory File/ need to be loaded into wiki, except files with a trailing underscore (e.g. Test.png_), which will be treated as a text file with markup for Test.png mediawiki page.

I think this should be a separate MW command - vagrant load-pages
Comment 3 Matthew Flaschen 2014-08-13 23:29:02 UTC
Note, there is now 'vagrant import-dump'. It uses a standard dump XML file.

I don't think there is any functionality to automatically do an import when you first create/vagrant up the wiki (what this bug requests).  I don't think this automatic import should require running a separate command (besides 'vagrant up').

I would also suggest that the 'vagrant load-pages' idea (loading from this directory structure) is a separate enhancement request.
Comment 4 Yuri Astrakhan 2014-08-13 23:37:28 UTC
Implemented in Change-Id: I79cfcc515a32e25c25817d67ac302eec4d5acda6 pending review.

Matthew, import-dump has a different goal - it's a complex transfer of textual data from one wiki to another.  This bug & the available patch address a very different, development oriented process: to quickly populate (or to reset to a known state) a given set of pages and images.  Now I no longer need to go and manually re-create custom pages that I use in my development - I simply run a command.

Initial pre-population of data vs population with a simple command are two different requests, even though they combined in my mind as they solve the same problem - populating an empty wiki. We could even create a simple script to generate some sample files and use "vagrant add-pages" to upload them.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links