Page MenuHomePhabricator

Add a checkbox in Special:Import to automatically add new sitelinks to the corresponding Wikidata item
Open, LowPublic

Description

In the Wikimedia projects, Special:Import should have an additional box that could be checked to automatically:

  • add the destination page as a sitelink to the Wikidata item that corresponds to the source page if this item already existed, or
  • create a Wikidata item and add sitelinks to both pages to it if the source page wasn't linked to any Wikidata item.

This feature shouldn't be available for user/talk/MediaWiki pages.

Event Timeline

Florian added a subscriber: Florian.

I moved this task to the Extension special pages, even if the change res requested to land on the Special:Import page. The reason is, that the main functionality should be developed in Wikibase, not in mediawiki/core. If there's something missing in the Special:Import page (e.g. a hook or whatever), we can think about changing this :P

However, two questions: How would mediawiki/core (or even Wikibase) find the _correct_ item to link a specific page to? And what should happen when no item was found? Should an item be automatically created (which could be duplicate dthen) or should the user get a question? :)

However, two questions: How would mediawiki/core (or even Wikibase) find the _correct_ item to link a specific page to?

This item should always be the one to which the source page is linked. If you were asking for a lower-level answer, I'm sorry, I'm not familiar enough with mediawiki/core nor with Wikibase.

And what should happen when no item was found? Should an item be automatically created (which could be duplicate dthen) or should the user get a question? :)

Ideally, just after typing the source page, the special page could show a message on the fly that let the user know if an item will be created.

However, I think that the idea of refreshing the special page and showing a question and an additional checkbox after pressing Import can be the best solution if development time, or resources in general, are limited for this low-priority task. This solution would be the same, mutatis mutandis, as the one currently used when an administrator tries to move a page to a title which is already taken by a different page.

This would be a nice (easy) task if SpecialImport was an extension of FormSpecialPage. After this is done (possibly as a part of T108792), we can use the hooks SpecialPageBeforeFormDisplay and AfterImportPage.