Page MenuHomePhabricator

prevent import of items
Closed, ResolvedPublic

Description

Importing items is horribly broken. We need to prevent it.


Version: master
Severity: major
Whiteboard: u=dev c=backend p=8
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=70898

Details

Reference
bz63228

Related Objects

Event Timeline

bzimport raised the priority of this task from to Unbreak Now!.Nov 22 2014, 2:54 AM
bzimport set Reference to bz63228.
bzimport added a subscriber: Unknown Object (MLST).

I assume that prevention is just meant to be a temporary measure until import of items is fixed?

Until someone can come up with a concept for importing that is actually workable and maintains data integrity.

Makes sense. In that case, you can just add a hook for 'TitleQuickPermissions' in wmf-config/CommonSettings.php to deny any user the import right in the item and property namespaces.

hoo added a comment.Apr 22 2014, 9:43 PM

(In reply to Kunal Mehta (Legoktm) from comment #3)

Makes sense. In that case, you can just add a hook for
'TitleQuickPermissions' in wmf-config/CommonSettings.php to deny any user
the import right in the item and property namespaces.

Sadly this is by far not this easy as core is only checking for the permissions in general, but not whether the user can import to a specific title (or namespace). I did some initial hacking in Wikibase but I'm not sure how to adopt core (that's super evil legacy code again...).

Mhm, is there any reason why this is such a high priority bug? I mean, since the import right is restricted to administrators anyway, and these are usually acting responsibly, a simple notice on Special:Import asking them not to import from ns0 should do it as well until a solution like Legoktm proposed becomes real instead of removing functionality (import of non-items) from the wikis.

Because that is not happening and people are complaining again and again about broken pages.

How can you know that before having tested it with a notice? To my knowledge, none exists yet so how they should know?

Lets find out: [[d:MediaWiki:Import-summary]].

Change 133227 had a related patch set uploaded by Daniel Kinzler:
Prevent import of entities to avoid ID conflicts

https://gerrit.wikimedia.org/r/133227