Page MenuHomePhabricator

New wikibases Main Page gets filled with default text
Closed, ResolvedPublic

Description

Related to/requires wikitext from: https://phabricator.wikimedia.org/T352188

Task: there's default wikitext for a Main Page that get's used for new wikibases.

There exists a proof of concept PR here: https://github.com/wbstack/mediawiki/pull/404/
It currently has the wikitext hardcoded in a variable. In case the source code is the right place for this to live, we should replace it with an agreed upon copy and store it somewhere slightly tidier, for example an autoloaded class constant.

Current implementation assumptions/limitations:

  • Every new wikibase gets the same default page
  • It's okay that if we change the text template, existing pages will not adjust to updated text versions
  • The text template does not change very often and requires engineers to change/deploy it

ACs:

Details

Other Assignee
Fring

Event Timeline

So, an interesting "tidbit" here is that MediaWiki does normally come with a default page.
However, I purposefully ignored it when creating the mediawiki schemas that get rolled out for all wikis
That page (or any other page) could get included agin if you copy over move content when making the schemas
https://github.com/wbstack/api/blob/main/database/mw/README.md?plain=1#L109

So another option (1)could be on schema generation, make 1 API call to udpate the main page, and then take all of that content into the schema creation

Another option you might consider (2), no idea if it would be harder or easier, would be to create mediawiki extension code that just displays alternative content on the Main Page if none is set.

On the whole I think Your option, or option 2 give you the most flexibility in terms of being able to easily update the page.
Possibly option 2 gives you slightly more, as if folks don't overwrite their main_page, you can still have this extension code update what appears there.

I have finished the text for the main page.
text can be found here https://charlie-experiments.wikibase.cloud/wiki/Main_Page

I have finished the text for the main page.
text can be found here https://charlie-experiments.wikibase.cloud/wiki/Main_Page

Thanks for working on this some more, I just read through the page and think that it would make a great Main page, so much more helpful than the currently empty one

I updated the old draft PR https://github.com/wbstack/mediawiki/pull/404
with the current contents of https://charlie-experiments.wikibase.cloud/wiki/Main_Page

Path forward as I see it:

  • After an initial tech review we can deploy this to staging
  • then get approval from Charlie
  • and then deploy it to production

@Charlie_WMDE I just deployed the feature to staging, so there we now can see that new wikis get the default content: https://mainpagetest-240415.wikibase.dev/wiki/Main_Page

If everything seems good we could move this to production as well

Deployed it to production - new wikis will get the page from now on