Page MenuHomePhabricator

Wikibase Repo prevents page moves in NS 0 on Commons
Closed, ResolvedPublic5 Story PointsBUG REPORT

Description

It seems that it is currently not possible for anybody to move gallery pages (namespace: 0), even not for admins.
I get the error message: Cannot move pages in namespace "".
when I try to do so.

Steps to Reproduce:
i.e. https://commons.wikimedia.org/wiki/Special:MovePage/Abdij_van_Berne

Actual Results:

Expected Results:
The move of gallery pages should be re-enabled to any users which had the permissions before, likely all autoconfirmed users, but minimum for admins.

Technical notes

  • Wikibase prevents moving pages in namespaces related to Wikibase-provided items, properties, but also other "entities". Moving of these is handled by Wikibase (e.g. by merging functionality) instead of Mediawiki.
  • The code responsible for checking whether the namespace X is handled by Wikibase uses all namespace IDs handled by Wikibase, even if the said namespace is the namespace on the other wiki (hence not relevant for the "local" wiki's moving functionality whatsoever)
  • In case of Commons, Wikidata items are stored in the main namespace of Wikidata. As the code does not distinct between namespaces on different wikis, pages in the main namespace on Commons are erroneously prevent from moving.

Event Timeline

JuTa created this task.May 24 2019, 4:39 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 24 2019, 4:39 PM
Clpo13 added a subscriber: Clpo13.May 24 2019, 4:58 PM
4nn1l2 added a subscriber: 4nn1l2.May 24 2019, 5:42 PM
Aklapper renamed this task from permission to move gallery pages on commons to "Cannot move pages in namespace """ when trying to move gallery pages on Commons.May 24 2019, 6:38 PM
Aklapper triaged this task as High priority.May 24 2019, 6:42 PM
Aklapper added a project: Regression.

A shot in the dark: @Simetrical: Has any refactoring from T222545 been merged and deployed?

Reedy updated the task description. (Show Details)May 25 2019, 8:03 PM
Restricted Application added a project: Multimedia. · View Herald TranscriptMay 25 2019, 8:11 PM
Reedy added a subscriber: Reedy.EditedMay 25 2019, 8:11 PM

It's because of MediaWiki-extensions-WikibaseRepository

> $namespaceLookup = \Wikibase\Repo\WikibaseRepo::getDefaultInstance()->getEntityNamespaceLookup();

> var_dump( $namespaceLookup->isEntityNamespace( 0 ) );
bool(true)

Due to... https://www.mediawiki.org/wiki/Manual:Hooks/NamespaceIsMovable

	public static function onNamespaceIsMovable( $ns, &$movable ) {
		$namespaceLookup = WikibaseRepo::getDefaultInstance()->getEntityNamespaceLookup();

		if ( $namespaceLookup->isEntityNamespace( $ns ) ) {
			$movable = false;
		}
	}
Reedy renamed this task from "Cannot move pages in namespace """ when trying to move gallery pages on Commons to Wikibase Repo prevents page moves in NS 0 on Commons.May 25 2019, 8:25 PM
Reedy added a comment.EditedMay 25 2019, 8:35 PM
> var_dump( \Wikibase\Repo\WikibaseRepo::getDefaultInstance()->getEntityNamespaceLookup()->getEntityNamespaces() );
array(3) {
  ["mediainfo"]=>
  int(6)
  ["item"]=>
  int(0)
  ["property"]=>
  int(120)
}
'wmgWikibaseRepoEntityNamespaces' => [
	'default' => [],
	'wikidata' => [
		'item' => 0,
		'property' => 120,
		'lexeme' => 146,
	],
	// WikibaseMediaInfo entity namespace and slot is hard-coded in the extension
],

'wmgWikibaseClientEntityNamespaces' => [
	'default' => [],
	'wikidataclient' => [
		'item' => 0,
		'property' => 120,
		'lexeme' => 146,
	],
],
reedy@mwmaint1002:~$ mwscript eval.php commonswiki
> var_dump( $wgWBClientSettings, $wgWBRepoSettings );
array(65) {
  ["useChangesTable"]=>
  bool(true)
  ["siteLinkGroups"]=>
  array(9) {
    [0]=>
    string(9) "wikipedia"
    [1]=>
    string(9) "wikibooks"
    [2]=>
    string(8) "wikinews"
    [3]=>
    string(9) "wikiquote"
    [4]=>
    string(10) "wikisource"
    [5]=>
    string(11) "wikiversity"
    [6]=>
    string(10) "wikivoyage"
    [7]=>
    string(10) "wiktionary"
    [8]=>
    string(7) "special"
  }
  ["specialSiteLinkGroups"]=>
  array(6) {
    [0]=>
    string(7) "commons"
    [1]=>
    string(9) "mediawiki"
    [2]=>
    string(4) "meta"
    [3]=>
    string(7) "species"
    [4]=>
    string(8) "wikidata"
    [5]=>
    string(9) "wikimania"
  }
  ["changesDatabase"]=>
  string(12) "wikidatawiki"
  ["maxSerializedEntitySize"]=>
  int(3000)
  ["namespaces"]=>
  array(0) {
  }
  ["excludeNamespaces"]=>
  object(Closure$;114)#224 (0) {
  }
  ["siteLocalID"]=>
  string(2) "en"
  ["languageLinkSiteGroup"]=>
  string(9) "wikipedia"
  ["injectRecentChanges"]=>
  bool(false)
  ["showExternalRecentChanges"]=>
  bool(true)
  ["sendEchoNotification"]=>
  bool(true)
  ["echoIcon"]=>
  array(1) {
    ["url"]=>
    string(36) "/static/images/wikibase/echoIcon.svg"
  }
  ["allowDataTransclusion"]=>
  bool(true)
  ["referencedEntityIdAccessLimit"]=>
  int(3)
  ["referencedEntityIdMaxDepth"]=>
  int(4)
  ["referencedEntityIdMaxReferencedEntityVisits"]=>
  int(50)
  ["pageSchemaNamespaces"]=>
  array(1) {
    [0]=>
    int(0)
  }
  ["allowLocalShortDesc"]=>
  bool(false)
  ["propagateChangesToRepo"]=>
  bool(true)
  ["propertyOrderUrl"]=>
  string(98) "https://www.wikidata.org/w/index.php?title=MediaWiki:Wikibase-SortedProperties&action=raw&sp_ver=1"
  ["useTermsTableSearchFields"]=>
  bool(false)
  ["forceWriteTermsTableSearchFields"]=>
  bool(false)
  ["badgeClassNames"]=>
  array(11) {
    ["Q17437796"]=>
    string(21) "badge-featuredarticle"
    ["Q17437798"]=>
    string(17) "badge-goodarticle"
    ["Q17559452"]=>
    string(24) "badge-recommendedarticle"
    ["Q17506997"]=>
    string(18) "badge-featuredlist"
    ["Q17580674"]=>
    string(20) "badge-featuredportal"
    ["Q20748091"]=>
    string(18) "badge-notproofread"
    ["Q20748094"]=>
    string(17) "badge-problematic"
    ["Q20748092"]=>
    string(15) "badge-proofread"
    ["Q20748093"]=>
    string(15) "badge-validated"
    ["Q28064618"]=>
    string(21) "badge-digitaldocument"
    ["Q51759403"]=>
    string(14) "badge-goodlist"
  }
  ["allowArbitraryDataAccess"]=>
  bool(true)
  ["entityAccessLimit"]=>
  int(400)
  ["allowDataAccessInUserLanguage"]=>
  bool(true)
  ["sharedCacheKeyPrefix"]=>
  string(46) "wikibase_shared/1_34_0-wmf_6-wikidatawiki-hhvm"
  ["sharedCacheKeyGroup"]=>
  string(12) "wikidatawiki"
  ["sharedCacheDuration"]=>
  int(86400)
  ["disabledDataTypes"]=>
  array(0) {
  }
  ["disabledUsageAspects"]=>
  array(1) {
    ["C"]=>
    string(1) "O"
  }
  ["fineGrainedLuaTracking"]=>
  bool(true)
  ["sharedCacheType"]=>
  string(8) "mcrouter"
  ["purgeCacheBatchSize"]=>
  object(Closure$;275)#210 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["recentChangesBatchSize"]=>
  object(Closure$#2;276)#211 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["useKartographerGlobeCoordinateFormatter"]=>
  bool(false)
  ["useKartographerMaplinkInWikitext"]=>
  bool(true)
  ["trackLuaFunctionCallsPerSiteGroup"]=>
  bool(true)
  ["trackLuaFunctionCallsPerWiki"]=>
  bool(true)
  ["useEntitySourceBasedFederation"]=>
  bool(true)
  ["entitySources"]=>
  array(0) {
  }
  ["thisWikiIsTheRepo"]=>
  object(Closure$#3;277)#212 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["repositories"]=>
  array(1) {
    [""]=>
    array(4) {
      ["repoDatabase"]=>
      string(12) "wikidatawiki"
      ["baseUri"]=>
      string(31) "http://www.wikidata.org/entity/"
      ["entityNamespaces"]=>
      array(3) {
        ["item"]=>
        int(0)
        ["property"]=>
        int(120)
        ["lexeme"]=>
        int(146)
      }
      ["prefixMapping"]=>
      array(1) {
        [""]=>
        string(0) ""
      }
    }
  }
  ["repoSiteName"]=>
  string(18) "wikibase-repo-name"
  ["repoUrl"]=>
  string(24) "https://www.wikidata.org"
  ["repoArticlePath"]=>
  object(Closure$#7;281)#216 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["repoScriptPath"]=>
  object(Closure$#8;282)#217 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["repoNamespaces"]=>
  array(2) {
    ["item"]=>
    string(0) ""
    ["property"]=>
    string(8) "Property"
  }
  ["siteGlobalID"]=>
  string(11) "commonswiki"
  ["repoSiteId"]=>
  object(Closure$#12;286)#221 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["siteGroup"]=>
  string(7) "commons"
  ["otherProjectsLinks"]=>
  object(Closure$#14;288)#223 (1) {
    ["parameter"]=>
    array(1) {
      ["$settings"]=>
      string(10) "<required>"
    }
  }
  ["geoShapeStorageBaseUrl"]=>
  string(35) "https://commons.wikimedia.org/wiki/"
  ["tabularDataStorageBaseUrl"]=>
  string(35) "https://commons.wikimedia.org/wiki/"
  ["disabledAccessEntityTypes"]=>
  array(3) {
    [0]=>
    string(6) "lexeme"
    [1]=>
    string(4) "form"
    [2]=>
    string(5) "sense"
  }
  ["entityUsagePerPageLimit"]=>
  int(100)
  ["entityUsageModifierLimits"]=>
  array(3) {
    ["D"]=>
    int(10)
    ["L"]=>
    int(10)
    ["C"]=>
    int(33)
  }
  ["addEntityUsagesBatchSize"]=>
  int(300)
  ["entityNamespaces"]=>
  array(3) {
    ["item"]=>
    int(0)
    ["property"]=>
    int(120)
    ["lexeme"]=>
    int(146)
  }
  ["repoDatabase"]=>
  string(12) "wikidatawiki"
  ["repoConceptBaseUri"]=>
  string(31) "http://www.wikidata.org/entity/"
  ["wikiPageUpdaterDbBatchSize"]=>
  int(20)
  ["pageSchemaSplitTestSamplingRatio"]=>
  int(1)
  ["pageSchemaSplitTestBuckets"]=>
  array(2) {
    [0]=>
    string(7) "control"
    [1]=>
    string(9) "treatment"
  }
}
array(77) {
  ["useChangesTable"]=>
  bool(true)
  ["siteLinkGroups"]=>
  array(9) {
    [0]=>
    string(9) "wikipedia"
    [1]=>
    string(9) "wikibooks"
    [2]=>
    string(8) "wikinews"
    [3]=>
    string(9) "wikiquote"
    [4]=>
    string(10) "wikisource"
    [5]=>
    string(11) "wikiversity"
    [6]=>
    string(10) "wikivoyage"
    [7]=>
    string(10) "wiktionary"
    [8]=>
    string(7) "special"
  }
  ["specialSiteLinkGroups"]=>
  array(6) {
    [0]=>
    string(7) "commons"
    [1]=>
    string(9) "mediawiki"
    [2]=>
    string(4) "meta"
    [3]=>
    string(7) "species"
    [4]=>
    string(8) "wikidata"
    [5]=>
    string(9) "wikimania"
  }
  ["changesDatabase"]=>
  bool(false)
  ["maxSerializedEntitySize"]=>
  int(3000)
  ["ssrServerUrl"]=>
  string(0) ""
  ["ssrServerTimeout"]=>
  int(3)
  ["termboxEnabled"]=>
  bool(false)
  ["termboxUserSpecificSsrEnabled"]=>
  bool(true)
  ["idBlacklist"]=>
  array(1) {
    ["wikibase-lexeme"]=>
    array(17) {
      [0]=>
      int(1)
      [1]=>
      int(5)
      [2]=>
      int(8)
      [3]=>
      int(18)
      [4]=>
      int(42)
      [5]=>
      int(55)
      [6]=>
      int(99)
      [7]=>
      int(117)
      [8]=>
      int(123)
      [9]=>
      int(221)
      [10]=>
      int(314)
      [11]=>
      int(666)
      [12]=>
      int(777)
      [13]=>
      int(1887)
      [14]=>
      int(12345)
      [15]=>
      int(24601)
      [16]=>
      int(171081)
    }
  }
  ["entityNamespaces"]=>
  array(0) {
  }
  ["readOnlyEntityTypes"]=>
  array(0) {
  }
  ["statementSections"]=>
  array(0) {
  }
  ["string-limits"]=>
  array(4) {
    ["multilang"]=>
    array(1) {
      ["length"]=>
      int(250)
    }
    ["VT:monolingualtext"]=>
    array(1) {
      ["length"]=>
      int(1500)
    }
    ["VT:string"]=>
    array(1) {
      ["length"]=>
      int(1500)
    }
    ["PT:url"]=>
    array(1) {
      ["length"]=>
      int(1500)
    }
  }
  ["urlSchemes"]=>
  array(10) {
    [0]=>
    string(3) "bzr"
    [1]=>
    string(3) "cvs"
    [2]=>
    string(3) "ftp"
    [3]=>
    string(3) "git"
    [4]=>
    string(4) "http"
    [5]=>
    string(5) "https"
    [6]=>
    string(3) "irc"
    [7]=>
    string(6) "mailto"
    [8]=>
    string(3) "ssh"
    [9]=>
    string(3) "svn"
  }
  ["badgeItems"]=>
  array(0) {
  }
  ["dataSquidMaxage"]=>
  int(3600)
  ["localClientDatabases"]=>
  array(0) {
  }
  ["dispatchMaxTime"]=>
  int(30)
  ["dispatchIdleDelay"]=>
  int(10)
  ["dispatchBatchChunkFactor"]=>
  int(3)
  ["dispatchBatchCacheFactor"]=>
  int(3)
  ["dispatchDefaultBatchSize"]=>
  int(420)
  ["dispatchDefaultMaxChunks"]=>
  int(15)
  ["dispatchDefaultDispatchInterval"]=>
  int(25)
  ["dispatchDefaultDispatchRandomness"]=>
  int(15)
  ["entityDataFormats"]=>
  array(7) {
    [0]=>
    string(4) "json"
    [1]=>
    string(3) "php"
    [2]=>
    string(6) "rdfxml"
    [3]=>
    string(2) "n3"
    [4]=>
    string(6) "turtle"
    [5]=>
    string(8) "ntriples"
    [6]=>
    string(4) "html"
  }
  ["enableEntitySearchUI"]=>
  bool(false)
  ["dataRightsUrl"]=>
  string(50) "https://creativecommons.org/publicdomain/zero/1.0/"
  ["rdfDataRightsUrl"]=>
  string(49) "http://creativecommons.org/publicdomain/zero/1.0/"
  ["dataRightsText"]=>
  string(28) "Creative Commons CC0 License"
  ["sparqlEndpoint"]=>
  NULL
  ["transformLegacyFormatOnExport"]=>
  bool(true)
  ["conceptBaseUri"]=>
  object(Closure$#3;249)#184 (0) {
  }
  ["formatterUrlProperty"]=>
  NULL
  ["canonicalUriProperty"]=>
  NULL
  ["allowEntityImport"]=>
  bool(false)
  ["sharedCacheKeyPrefix"]=>
  string(46) "wikibase_shared/1_34_0-wmf_6-wikidatawiki-hhvm"
  ["sharedCacheKeyGroup"]=>
  string(12) "wikidatawiki"
  ["sharedCacheDuration"]=>
  int(86400)
  ["sharedCacheType"]=>
  string(8) "mcrouter"
  ["disabledDataTypes"]=>
  array(0) {
  }
  ["canonicalLanguageCodes"]=>
  array(10) {
    ["simple"]=>
    string(9) "en-simple"
    ["crh"]=>
    string(8) "crh-Latn"
    ["cbk-zam"]=>
    string(9) "cbk-x-zam"
    ["map-bms"]=>
    string(8) "jv-x-bms"
    ["nrm"]=>
    string(8) "fr-x-nrm"
    ["roa-tara"]=>
    string(9) "it-x-tara"
    ["de-formal"]=>
    string(11) "de-x-formal"
    ["es-formal"]=>
    string(11) "es-x-formal"
    ["hu-formal"]=>
    string(11) "hu-x-formal"
    ["nl-informal"]=>
    string(13) "nl-x-informal"
  }
  ["preferredPageImagesProperties"]=>
  array(0) {
  }
  ["preferredGeoDataProperties"]=>
  array(0) {
  }
  ["globeUris"]=>
  array(27) {
    ["http://www.wikidata.org/entity/Q2"]=>
    string(5) "earth"
    ["http://www.wikidata.org/entity/Q308"]=>
    string(7) "mercury"
    ["http://www.wikidata.org/entity/Q313"]=>
    string(5) "venus"
    ["http://www.wikidata.org/entity/Q405"]=>
    string(4) "moon"
    ["http://www.wikidata.org/entity/Q111"]=>
    string(4) "mars"
    ["http://www.wikidata.org/entity/Q7547"]=>
    string(6) "phobos"
    ["http://www.wikidata.org/entity/Q7548"]=>
    string(6) "deimos"
    ["http://www.wikidata.org/entity/Q3169"]=>
    string(8) "ganymede"
    ["http://www.wikidata.org/entity/Q3134"]=>
    string(8) "callisto"
    ["http://www.wikidata.org/entity/Q3123"]=>
    string(2) "io"
    ["http://www.wikidata.org/entity/Q3143"]=>
    string(6) "europa"
    ["http://www.wikidata.org/entity/Q15034"]=>
    string(5) "mimas"
    ["http://www.wikidata.org/entity/Q3303"]=>
    string(9) "enceladus"
    ["http://www.wikidata.org/entity/Q15047"]=>
    string(6) "tethys"
    ["http://www.wikidata.org/entity/Q15040"]=>
    string(5) "dione"
    ["http://www.wikidata.org/entity/Q15050"]=>
    string(4) "rhea"
    ["http://www.wikidata.org/entity/Q2565"]=>
    string(5) "titan"
    ["http://www.wikidata.org/entity/Q15037"]=>
    string(8) "hyperion"
    ["http://www.wikidata.org/entity/Q17958"]=>
    string(7) "iapetus"
    ["http://www.wikidata.org/entity/Q17975"]=>
    string(6) "phoebe"
    ["http://www.wikidata.org/entity/Q3352"]=>
    string(7) "miranda"
    ["http://www.wikidata.org/entity/Q3343"]=>
    string(5) "ariel"
    ["http://www.wikidata.org/entity/Q3338"]=>
    string(7) "umbriel"
    ["http://www.wikidata.org/entity/Q3322"]=>
    string(7) "titania"
    ["http://www.wikidata.org/entity/Q3332"]=>
    string(6) "oberon"
    ["http://www.wikidata.org/entity/Q3359"]=>
    string(6) "triton"
    ["http://www.wikidata.org/entity/Q339"]=>
    string(5) "pluto"
  }
  ["pagePropertiesRdf"]=>
  array(3) {
    ["wb-sitelinks"]=>
    array(2) {
      ["name"]=>
      string(9) "sitelinks"
      ["type"]=>
      string(7) "integer"
    }
    ["wb-claims"]=>
    array(2) {
      ["name"]=>
      string(10) "statements"
      ["type"]=>
      string(7) "integer"
    }
    ["wb-identifiers"]=>
    array(2) {
      ["name"]=>
      string(11) "identifiers"
      ["type"]=>
      string(7) "integer"
    }
  }
  ["foreignRepositories"]=>
  array(1) {
    ["d"]=>
    array(5) {
      ["repoDatabase"]=>
      string(12) "wikidatawiki"
      ["baseUri"]=>
      string(31) "http://www.wikidata.org/entity/"
      ["supportedEntityTypes"]=>
      array(2) {
        [0]=>
        string(4) "item"
        [1]=>
        string(8) "property"
      }
      ["prefixMapping"]=>
      array(0) {
      }
      ["entityNamespaces"]=>
      array(2) {
        ["item"]=>
        int(0)
        ["property"]=>
        int(120)
      }
    }
  }
  ["geoShapeStorageApiEndpointUrl"]=>
  string(39) "https://commons.wikimedia.org/w/api.php"
  ["geoShapeStorageBaseUrl"]=>
  string(35) "https://commons.wikimedia.org/wiki/"
  ["tabularDataStorageApiEndpointUrl"]=>
  string(39) "https://commons.wikimedia.org/w/api.php"
  ["tabularDataStorageBaseUrl"]=>
  string(35) "https://commons.wikimedia.org/wiki/"
  ["dispatchingLockManager"]=>
  string(32) "wikibaseDispatchRedisLockManager"
  ["searchIndexProperties"]=>
  array(1) {
    [0]=>
    string(4) "P180"
  }
  ["searchIndexTypes"]=>
  array(7) {
    [0]=>
    string(6) "string"
    [1]=>
    string(11) "external-id"
    [2]=>
    string(13) "wikibase-item"
    [3]=>
    string(17) "wikibase-property"
    [4]=>
    string(15) "wikibase-lexeme"
    [5]=>
    string(13) "wikibase-form"
    [6]=>
    string(14) "wikibase-sense"
  }
  ["searchIndexPropertiesExclude"]=>
  array(0) {
  }
  ["searchIndexQualifierPropertiesForQuantity"]=>
  array(0) {
  }
  ["useTermsTableSearchFields"]=>
  bool(false)
  ["forceWriteTermsTableSearchFields"]=>
  bool(false)
  ["dispatchLagToMaxLagFactor"]=>
  int(60)
  ["dumpDBDefaultGroup"]=>
  string(4) "dump"
  ["useKartographerGlobeCoordinateFormatter"]=>
  bool(true)
  ["useKartographerMaplinkInWikitext"]=>
  bool(false)
  ["idGenerator"]=>
  string(12) "mysql-upsert"
  ["idGeneratorSeparateDbConnection"]=>
  bool(false)
  ["entityTypesWithoutRdfOutput"]=>
  array(1) {
    [0]=>
    string(9) "mediainfo"
  }
  ["useEntitySourceBasedFederation"]=>
  bool(true)
  ["entitySources"]=>
  array(0) {
  }
  ["localEntitySourceName"]=>
  string(5) "local"
  ["featureFlagWbeditentitySetEmptyAliases"]=>
  bool(false)
  ["tmpSerializeEmptyListsAsObjects"]=>
  bool(true)
  ["tmpTermStoreMigrationStage"]=>
  int(3)
  ["enablePopulateWithRandomEntitiesAndTermsScript"]=>
  bool(false)
  ["disableCirrus"]=>
  bool(true)
  ["clientDbList"]=>
  array(0) {
  }
  ["normalizeItemByTitlePageNames"]=>
  bool(true)
  ["unitStorage"]=>
  array(2) {
    ["class"]=>
    string(35) "\Wikibase\Lib\Units\JsonUnitStorage"
    ["args"]=>
    array(1) {
      [0]=>
      string(51) "/srv/mediawiki/wmf-config/unitConversionConfig.json"
    }
  }
}
Reedy added a comment.May 25 2019, 8:54 PM
		$entityNamespaces = self::buildEntityNamespaceConfigurations( $settings );
		Hooks::run( 'WikibaseRepoEntityNamespaces', [ &$entityNamespaces ] );
> var_dump( Wikibase\WikibaseSettings::getRepoSettings() );
object(Wikibase\SettingsArray)#720 (1) {
  ["storage":"ArrayObject":private]=>
  array(77) {
    ["useChangesTable"]=>
    bool(true)
    ["siteLinkGroups"]=>
    array(9) {
      [0]=>
      string(9) "wikipedia"
      [1]=>
      string(9) "wikibooks"
      [2]=>
      string(8) "wikinews"
      [3]=>
      string(9) "wikiquote"
      [4]=>
      string(10) "wikisource"
      [5]=>
      string(11) "wikiversity"
      [6]=>
      string(10) "wikivoyage"
      [7]=>
      string(10) "wiktionary"
      [8]=>
      string(7) "special"
    }
    ["specialSiteLinkGroups"]=>
    array(6) {
      [0]=>
      string(7) "commons"
      [1]=>
      string(9) "mediawiki"
      [2]=>
      string(4) "meta"
      [3]=>
      string(7) "species"
      [4]=>
      string(8) "wikidata"
      [5]=>
      string(9) "wikimania"
    }
    ["changesDatabase"]=>
    bool(false)
    ["maxSerializedEntitySize"]=>
    int(3000)
    ["ssrServerUrl"]=>
    string(0) ""
    ["ssrServerTimeout"]=>
    int(3)
    ["termboxEnabled"]=>
    bool(false)
    ["termboxUserSpecificSsrEnabled"]=>
    bool(true)
    ["idBlacklist"]=>
    array(1) {
      ["wikibase-lexeme"]=>
      array(17) {
        [0]=>
        int(1)
        [1]=>
        int(5)
        [2]=>
        int(8)
        [3]=>
        int(18)
        [4]=>
        int(42)
        [5]=>
        int(55)
        [6]=>
        int(99)
        [7]=>
        int(117)
        [8]=>
        int(123)
        [9]=>
        int(221)
        [10]=>
        int(314)
        [11]=>
        int(666)
        [12]=>
        int(777)
        [13]=>
        int(1887)
        [14]=>
        int(12345)
        [15]=>
        int(24601)
        [16]=>
        int(171081)
      }
    }
    ["entityNamespaces"]=>
    array(1) {
      ["mediainfo"]=>
      string(11) "6/mediainfo"
    }
    ["readOnlyEntityTypes"]=>
    array(0) {
    }
    ["statementSections"]=>
    array(0) {
    }
    ["string-limits"]=>
    array(4) {
      ["multilang"]=>
      array(1) {
        ["length"]=>
        int(250)
      }
      ["VT:monolingualtext"]=>
      array(1) {
        ["length"]=>
        int(1500)
      }
      ["VT:string"]=>
      array(1) {
        ["length"]=>
        int(1500)
      }
      ["PT:url"]=>
      array(1) {
        ["length"]=>
        int(1500)
      }
    }
    ["urlSchemes"]=>
    array(10) {
      [0]=>
      string(3) "bzr"
      [1]=>
      string(3) "cvs"
      [2]=>
      string(3) "ftp"
      [3]=>
      string(3) "git"
      [4]=>
      string(4) "http"
      [5]=>
      string(5) "https"
      [6]=>
      string(3) "irc"
      [7]=>
      string(6) "mailto"
      [8]=>
      string(3) "ssh"
      [9]=>
      string(3) "svn"
    }
    ["badgeItems"]=>
    array(0) {
    }
    ["dataSquidMaxage"]=>
    int(3600)
    ["localClientDatabases"]=>
    array(0) {
    }
    ["dispatchMaxTime"]=>
    int(30)
    ["dispatchIdleDelay"]=>
    int(10)
    ["dispatchBatchChunkFactor"]=>
    int(3)
    ["dispatchBatchCacheFactor"]=>
    int(3)
    ["dispatchDefaultBatchSize"]=>
    int(420)
    ["dispatchDefaultMaxChunks"]=>
    int(15)
    ["dispatchDefaultDispatchInterval"]=>
    int(25)
    ["dispatchDefaultDispatchRandomness"]=>
    int(15)
    ["entityDataFormats"]=>
    array(7) {
      [0]=>
      string(4) "json"
      [1]=>
      string(3) "php"
      [2]=>
      string(6) "rdfxml"
      [3]=>
      string(2) "n3"
      [4]=>
      string(6) "turtle"
      [5]=>
      string(8) "ntriples"
      [6]=>
      string(4) "html"
    }
    ["enableEntitySearchUI"]=>
    bool(false)
    ["dataRightsUrl"]=>
    string(50) "https://creativecommons.org/publicdomain/zero/1.0/"
    ["rdfDataRightsUrl"]=>
    string(49) "http://creativecommons.org/publicdomain/zero/1.0/"
    ["dataRightsText"]=>
    string(28) "Creative Commons CC0 License"
    ["sparqlEndpoint"]=>
    NULL
    ["transformLegacyFormatOnExport"]=>
    bool(true)
    ["conceptBaseUri"]=>
    object(Closure$#3;249)#184 (0) {
    }
    ["formatterUrlProperty"]=>
    NULL
    ["canonicalUriProperty"]=>
    NULL
    ["allowEntityImport"]=>
    bool(false)
    ["sharedCacheKeyPrefix"]=>
    string(46) "wikibase_shared/1_34_0-wmf_6-wikidatawiki-hhvm"
    ["sharedCacheKeyGroup"]=>
    string(12) "wikidatawiki"
    ["sharedCacheDuration"]=>
    int(86400)
    ["sharedCacheType"]=>
    string(8) "mcrouter"
    ["disabledDataTypes"]=>
    array(0) {
    }
    ["canonicalLanguageCodes"]=>
    array(10) {
      ["simple"]=>
      string(9) "en-simple"
      ["crh"]=>
      string(8) "crh-Latn"
      ["cbk-zam"]=>
      string(9) "cbk-x-zam"
      ["map-bms"]=>
      string(8) "jv-x-bms"
      ["nrm"]=>
      string(8) "fr-x-nrm"
      ["roa-tara"]=>
      string(9) "it-x-tara"
      ["de-formal"]=>
      string(11) "de-x-formal"
      ["es-formal"]=>
      string(11) "es-x-formal"
      ["hu-formal"]=>
      string(11) "hu-x-formal"
      ["nl-informal"]=>
      string(13) "nl-x-informal"
    }
    ["preferredPageImagesProperties"]=>
    array(0) {
    }
    ["preferredGeoDataProperties"]=>
    array(0) {
    }
    ["globeUris"]=>
    array(27) {
      ["http://www.wikidata.org/entity/Q2"]=>
      string(5) "earth"
      ["http://www.wikidata.org/entity/Q308"]=>
      string(7) "mercury"
      ["http://www.wikidata.org/entity/Q313"]=>
      string(5) "venus"
      ["http://www.wikidata.org/entity/Q405"]=>
      string(4) "moon"
      ["http://www.wikidata.org/entity/Q111"]=>
      string(4) "mars"
      ["http://www.wikidata.org/entity/Q7547"]=>
      string(6) "phobos"
      ["http://www.wikidata.org/entity/Q7548"]=>
      string(6) "deimos"
      ["http://www.wikidata.org/entity/Q3169"]=>
      string(8) "ganymede"
      ["http://www.wikidata.org/entity/Q3134"]=>
      string(8) "callisto"
      ["http://www.wikidata.org/entity/Q3123"]=>
      string(2) "io"
      ["http://www.wikidata.org/entity/Q3143"]=>
      string(6) "europa"
      ["http://www.wikidata.org/entity/Q15034"]=>
      string(5) "mimas"
      ["http://www.wikidata.org/entity/Q3303"]=>
      string(9) "enceladus"
      ["http://www.wikidata.org/entity/Q15047"]=>
      string(6) "tethys"
      ["http://www.wikidata.org/entity/Q15040"]=>
      string(5) "dione"
      ["http://www.wikidata.org/entity/Q15050"]=>
      string(4) "rhea"
      ["http://www.wikidata.org/entity/Q2565"]=>
      string(5) "titan"
      ["http://www.wikidata.org/entity/Q15037"]=>
      string(8) "hyperion"
      ["http://www.wikidata.org/entity/Q17958"]=>
      string(7) "iapetus"
      ["http://www.wikidata.org/entity/Q17975"]=>
      string(6) "phoebe"
      ["http://www.wikidata.org/entity/Q3352"]=>
      string(7) "miranda"
      ["http://www.wikidata.org/entity/Q3343"]=>
      string(5) "ariel"
      ["http://www.wikidata.org/entity/Q3338"]=>
      string(7) "umbriel"
      ["http://www.wikidata.org/entity/Q3322"]=>
      string(7) "titania"
      ["http://www.wikidata.org/entity/Q3332"]=>
      string(6) "oberon"
      ["http://www.wikidata.org/entity/Q3359"]=>
      string(6) "triton"
      ["http://www.wikidata.org/entity/Q339"]=>
      string(5) "pluto"
    }
    ["pagePropertiesRdf"]=>
    array(3) {
      ["wb-sitelinks"]=>
      array(2) {
        ["name"]=>
        string(9) "sitelinks"
        ["type"]=>
        string(7) "integer"
      }
      ["wb-claims"]=>
      array(2) {
        ["name"]=>
        string(10) "statements"
        ["type"]=>
        string(7) "integer"
      }
      ["wb-identifiers"]=>
      array(2) {
        ["name"]=>
        string(11) "identifiers"
        ["type"]=>
        string(7) "integer"
      }
    }
    ["foreignRepositories"]=>
    array(1) {
      ["d"]=>
      array(5) {
        ["repoDatabase"]=>
        string(12) "wikidatawiki"
        ["baseUri"]=>
        string(31) "http://www.wikidata.org/entity/"
        ["supportedEntityTypes"]=>
        array(2) {
          [0]=>
          string(4) "item"
          [1]=>
          string(8) "property"
        }
        ["prefixMapping"]=>
        array(0) {
        }
        ["entityNamespaces"]=>
        array(2) {
          ["item"]=>
          int(0)
          ["property"]=>
          int(120)
        }
      }
    }
    ["geoShapeStorageApiEndpointUrl"]=>
    string(39) "https://commons.wikimedia.org/w/api.php"
    ["geoShapeStorageBaseUrl"]=>
    string(35) "https://commons.wikimedia.org/wiki/"
    ["tabularDataStorageApiEndpointUrl"]=>
    string(39) "https://commons.wikimedia.org/w/api.php"
    ["tabularDataStorageBaseUrl"]=>
    string(35) "https://commons.wikimedia.org/wiki/"
    ["dispatchingLockManager"]=>
    string(32) "wikibaseDispatchRedisLockManager"
    ["searchIndexProperties"]=>
    array(1) {
      [0]=>
      string(4) "P180"
    }
    ["searchIndexTypes"]=>
    array(7) {
      [0]=>
      string(6) "string"
      [1]=>
      string(11) "external-id"
      [2]=>
      string(13) "wikibase-item"
      [3]=>
      string(17) "wikibase-property"
      [4]=>
      string(15) "wikibase-lexeme"
      [5]=>
      string(13) "wikibase-form"
      [6]=>
      string(14) "wikibase-sense"
    }
    ["searchIndexPropertiesExclude"]=>
    array(0) {
    }
    ["searchIndexQualifierPropertiesForQuantity"]=>
    array(0) {
    }
    ["useTermsTableSearchFields"]=>
    bool(false)
    ["forceWriteTermsTableSearchFields"]=>
    bool(false)
    ["dispatchLagToMaxLagFactor"]=>
    int(60)
    ["dumpDBDefaultGroup"]=>
    string(4) "dump"
    ["useKartographerGlobeCoordinateFormatter"]=>
    bool(true)
    ["useKartographerMaplinkInWikitext"]=>
    bool(false)
    ["idGenerator"]=>
    string(12) "mysql-upsert"
    ["idGeneratorSeparateDbConnection"]=>
    bool(false)
    ["entityTypesWithoutRdfOutput"]=>
    array(1) {
      [0]=>
      string(9) "mediainfo"
    }
    ["useEntitySourceBasedFederation"]=>
    bool(true)
    ["entitySources"]=>
    array(0) {
    }
    ["localEntitySourceName"]=>
    string(5) "local"
    ["featureFlagWbeditentitySetEmptyAliases"]=>
    bool(false)
    ["tmpSerializeEmptyListsAsObjects"]=>
    bool(true)
    ["tmpTermStoreMigrationStage"]=>
    int(3)
    ["enablePopulateWithRandomEntitiesAndTermsScript"]=>
    bool(false)
    ["disableCirrus"]=>
    bool(true)
    ["clientDbList"]=>
    array(0) {
    }
    ["normalizeItemByTitlePageNames"]=>
    bool(true)
    ["unitStorage"]=>
    array(2) {
      ["class"]=>
      string(35) "\Wikibase\Lib\Units\JsonUnitStorage"
      ["args"]=>
      array(1) {
        [0]=>
        string(51) "/srv/mediawiki/wmf-config/unitConversionConfig.json"
      }
    }
  }
}

Indeed...

On testcommons, the WikibaseRepo’s entity namespace lookup thinks there are items and properites in namespaces 0 and 120:

> var_export( Wikibase\Repo\WikibaseRepo::getDefaultInstance()->getEntityNamespaceLookup() );
Wikibase\Lib\Store\EntityNamespaceLookup::__set_state(array(
  'entityNamespaces' => 
  array (
    'mediainfo' => 6,
    'item' => 0,
    'property' => 120,
  ),
  'entitySlots' => 
  array (
    'mediainfo' => 'mediainfo',
    'item' => 'main',
    'property' => 'main',
  ),
))

This causes the ContentModelCanBeUsedOn hook handler to reject wikitext content for titles in those namespaces. I’m not familiar enough with Wikibase federation to say what part of this is wrong.

Tarrow added a subscriber: Tarrow.May 27 2019, 9:53 AM
Cparle added a subscriber: Cparle.May 28 2019, 4:51 PM

Hullo @alaa_wmde , do you have a rough eta for this? Inquiring minds want to tell other inquiring minds :)

@Abit Reallistically not sooner than next week, sorry. This requires some code change, we'll try targeting the next deployment train.

Abit added a comment.May 29 2019, 4:28 PM

Sweet--looking forward to it. Thanks so much for the update, Mr. Manicki :)

Ramsey-WMF moved this task from Untriaged to Tracking on the Multimedia board.May 29 2019, 7:20 PM

I was trying to move a page on Commons. I had the same problem

https://commons.wikimedia.org/wiki/Commons:Help_desk#move_a_non-file_Commons_page

clpo13 directed me to this ticket so I am reporting the same issue.

Jeff_G added a subscriber: Jeff_G.Jun 4 2019, 3:52 PM
WMDE-leszek updated the task description. (Show Details)Jun 12 2019, 8:10 AM
WMDE-leszek set the point value for this task to 5.Jun 12 2019, 12:00 PM
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptJun 18 2019, 1:59 PM

Change 517690 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Added tests for pages local entity namespaces not being allowed to be moved

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

Change 517692 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Do not block moving pages in the namespace, if the same namespace used by Wikibase on other wiki

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

Change 517690 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Added tests for pages local entity namespaces not being allowed to be moved

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

Change 517849 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Do not block moving local main pages if foreign repository's entity is in main namespace

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

Change 517692 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Do not block moving pages in the namespace, if the same namespace used by Wikibase on other wiki

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

Change 517849 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Do not block moving local main pages if foreign repository's entity is in main namespace

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

Addshore moved this task from incoming to in progress on the Wikidata board.Jun 21 2019, 11:28 PM
Majora added a subscriber: Majora.Jun 26 2019, 10:36 PM

So, whatever fix you all implemented to fix the ns 0 issue now appears to have broken moving files. I'm getting the same permission error I got with the gallery namespace. It is not just me either per https://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard#Moving_files

Thanks @Majora, this is indeed bad. Apologies for the situation! I'm looking into the bug.

Meisam added a subscriber: Meisam.Jun 27 2019, 12:12 PM
Fito added a subscriber: Fito.Jun 27 2019, 3:44 PM

So, whatever fix you all implemented to fix the ns 0 issue now appears to have broken moving files. I'm getting the same permission error I got with the gallery namespace. It is not just me either per https://commons.wikimedia.org/wiki/Commons:Administrators%27_noticeboard#Moving_files

That issue has been filed as T226672

Change 519622 had a related patch set uploaded (by WMDE-leszek; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@master] Do not blocking pages in namespaces if the namespace contains Wikibase entity in non-main slot

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

Change 519622 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Do not block moving pages in namespaces if the namespace contains Wikibase entity in non-main slot

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

Change 519687 had a related patch set uploaded (by Jforrester; owner: WMDE-leszek):
[mediawiki/extensions/Wikibase@wmf/1.34.0-wmf.11] Do not block moving pages in namespaces if the namespace contains Wikibase entity in non-main slot

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

Change 519687 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@wmf/1.34.0-wmf.11] Do not block moving pages in namespaces if the namespace contains Wikibase entity in non-main slot

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

Mentioned in SAL (#wikimedia-operations) [2019-06-28T20:09:02Z] <jforrester@deploy1001> Synchronized php-1.34.0-wmf.11/extensions/Wikibase/repo/RepoHooks.php: Make it possible for File pages to be moved on Commons again T224303 T226672 (duration: 00m 50s)

Jdforrester-WMF closed this task as Resolved.Jun 28 2019, 8:12 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Emergency-deployed and seems to now be working.