Page MenuHomePhabricator

Wikibase Repo api modules and special pages should be conditionally loaded based on entity types enabled (or at least, not crash)
Open, Needs TriagePublic

Description

Shouldn't be listed:

  • Special:AvailableBadges
  • Special:NewItem
  • Special:EntitiesWithoutDescription
  • Special:EntitiesWithoutLabel
  • Special:GoToLinkedPage
  • Special:ItemByTitle
  • Special:ItemDisambiguation
  • Special:ItemsWithoutSitelinks
  • Special:MergeItems
  • Special:RedirectEntity
  • Special:SetDescription
  • Special:SetLabel
  • Special:SetSiteLink
  • Special:SetAliases
  • Special:SetLabelDescriptionAliases

Or able to load:

  • Special:AvailableBadges
  • Special:NewItem
  • Special:EntitiesWithoutDescription
  • Special:EntitiesWithoutLabel
  • Special:GoToLinkedPage
  • Special:ItemByTitle
  • Special:ItemDisambiguation
  • Special:ItemsWithoutSitelinks
  • Special:MergeItems
  • Special:NewProperty
  • Special:RedirectEntity
  • Special:SetDescription
  • Special:SetLabel
  • Special:SetSiteLink
  • Special:SetAliases
  • Special:SetLabelDescriptionAliases

Are fine:

  • Special:DispatchStats
  • Special:ListProperties
  • Special:EntityData
  • Special:EntityPage
  • Special:MyLanguageFallbackChain

Maybe should change:

  • Special:ListDatatypes - should be blank or in some other way show that the data types are known but not allowed?

Event Timeline

Addshore created this task.Oct 22 2018, 6:31 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 22 2018, 6:31 PM

Excerpt:

11:25:35 <addshore> right, there are some things we probably didnt think about
11:26:46 <addshore> special pages and api modules should be registered conditionally based on the entity types loaded
11:26:47 <addshore> for example
11:26:59 <addshore> we don't want Special:NewItem for example on commons
11:27:03 <addshore> and right now we have it
11:27:15 <James_F> Easy to fix, or will we need to re-arch. half of Wikibase?
11:27:22 <addshore> api modules are trickeier, as I guess we want wbeditentity, but probably with different examples
11:27:37 <addshore> should be an "easy fix" will spend some time about how to do it right
11:27:52 <addshore> whats the planned date for getting this on real commons?
11:27:59 <addshore> i'll keep looking around for other things
11:32:40 <addshore> https://usercontent.irccloud-cdn.com/file/ofmgiw50/image.png
11:32:51 <addshore> I feel like this should be a different error message, mildly concerning
11:33:31 <James_F> It should fail earlier.
11:34:01 <addshore> yup
11:34:49 <addshore> looking at the code it special new item already shouldnt load
11:34:50 <addshore> hmm
11:35:08 <addshore> hmmhmmmmhmm
11:36:47 <addshore> https://www.irccloud.com/pastebin/kvEIZe6O/
11:36:59 <addshore> that is in Wikibase.php in mw-config and loaded for all wikibases
11:37:55 <addshore> right, I dont like this config now
11:38:07 <addshore> Wikibase.php is conditionality loaded based on if ( $wmgUseWikibaseRepo || $wmgUseWikibaseClient ) {
11:38:22 <addshore> for commons wiki that means Wikibase.php it loaded because $wmgUseWikibaseClient is true
11:39:14 <addshore> so we should either add $wmgUseWikibaseMediaInfo to the CommonsSettings.php condition
11:39:18 <addshore> or think about something else to do
11:39:44 <addshore> Right, wikibase.php also needs more cleanup
11:39:45 <addshore> meh
11:39:54 <addshore> i dont think we want to put mediainfo on beta today
11:40:07 <addshore> I can try and look at cleaning this up at some point, but not today i doubt it
11:40:39 <addshore> James_F: we should probably turn wikibase repo off on beta, it will currently allow you to create properties etc, and we don't want that and id rather not have to clean stuff up
11:41:06 <James_F> OK.
11:41:14 <addshore> ty :)
11:41:43 <addshore> but im glad we did this as early as possible, :) makes it easier than spending a week just thinking about the things that need to happen etc.
11:42:41 <James_F> Yeah.

It actually looks like pages like Special:NewItem already have a check that means they shouldn't be listed when the relevant entity type is not defined, but there was an issue with the confg that we tried on beta earlier that meant these entity types were enabled.
The entity type will actually be defined when comons "federates" its items to wikidata.org, so we should make sure this check still does the correct thing..

Jdforrester-WMF renamed this task from Wikibase Repo api modules and special pages should be conditionality loaded based on entity types enabled? to Wikibase Repo api modules and special pages should be conditionally loaded based on entity types enabled?.Oct 24 2018, 12:38 AM
Addshore updated the task description. (Show Details)Oct 25 2018, 11:15 PM

Also CreateProperty should probably be de-listed whilst it's inoperable.

Ramsey-WMF moved this task from Untriaged to Tracking on the Multimedia board.
Jdforrester-WMF renamed this task from Wikibase Repo api modules and special pages should be conditionally loaded based on entity types enabled? to Wikibase Repo api modules and special pages should be conditionally loaded based on entity types enabled (or at least, not crash).Jan 11 2019, 12:02 AM
Multichill updated the task description. (Show Details)Jan 12 2019, 12:25 AM
Addshore moved this task from incoming to monitoring on the Wikidata board.Jan 25 2019, 2:20 PM

It actually looks like pages like Special:NewItem already have a check that means they shouldn't be listed when the relevant entity type is not defined, but there was an issue with the confg that we tried on beta earlier that meant these entity types were enabled.
The entity type will actually be defined when comons "federates" its items to wikidata.org, so we should make sure this check still does the correct thing..

Just to clarify: currently, all of these are actually available and listed on production Commons. The ones that edit seem to get an error on submit (e. g. “Entities of type: item is not provided by source: local”), behavior for the others seems to vary.

hoo updated the task description. (Show Details)May 9 2019, 11:33 AM
hoo added a subscriber: hoo.

Would it help to remove the relevant rights from users on commons? If users don't have property-create, it'll cleanly block them from trying to create new properties. Other wikibase rights that are given to * include property-term, item-term, mediainfo-term (which should probably be kept), and item-redirect.

Yup, it would also make sense to conditionally load those.

Restricted Application added a project: Multimedia. · View Herald TranscriptAug 10 2019, 11:54 PM