Page MenuHomePhabricator

SpecialItemsWithoutSitelinksTest::testExecute InvalidArgumentException: $idSerialization must match /^Q[1-9]\d{0,9}\z/i
Closed, ResolvedPublic

Description

I am getting this test failure when running --group Wikibase tests:

1) Wikibase\Repo\Tests\Specials\SpecialItemsWithoutSitelinksTest::testExecute
InvalidArgumentException: $idSerialization must match /^Q[1-9]\d{0,9}\z/i

/var/www/wiki/w/extensions/Wikidata/vendor/wikibase/data-model/src/Entity/ItemId.php:40
/var/www/wiki/w/extensions/Wikidata/vendor/wikibase/data-model/src/Entity/ItemId.php:28
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/includes/Store/Sql/SqlItemsWithoutSitelinksFinder.php:70
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/includes/Store/Sql/SqlItemsWithoutSitelinksFinder.php:63
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/includes/Specials/SpecialItemsWithoutSitelinks.php:41
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/includes/Specials/SpecialWikibaseQueryPage.php:113
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/includes/Specials/SpecialItemsWithoutSitelinks.php:28
/var/www/wiki/w/tests/phpunit/includes/specials/SpecialPageExecutor.php:105
/var/www/wiki/w/tests/phpunit/includes/specials/SpecialPageExecutor.php:36
/var/www/wiki/w/tests/phpunit/includes/specials/SpecialPageTestBase.php:69
/var/www/wiki/w/extensions/Wikidata/extensions/Wikibase/repo/tests/phpunit/includes/Specials/SpecialItemsWithoutSitelinksTest.php:43
/var/www/wiki/w/tests/phpunit/MediaWikiTestCase.php:400
/var/www/wiki/w/maintenance/doMaintenance.php:111

Event Timeline

Change 343543 had a related patch set uploaded (by Aude):
[mediawiki/extensions/Wikibase] Don't create property in item namespace in ReferencedEntitiesDataUpdaterTest

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

Change 343543 merged by jenkins-bot:
[mediawiki/extensions/Wikibase] Don't create property in item namespace in ReferencedEntitiesDataUpdaterTest

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

I couldn't reproduce the test failure locally, so let me ask @aude: as that patch got merged, is this bug resolved?

think this issue only happens with items in the main namespace. Otherwise, if the main namespace is wikitext, then the property was created in the main wikitext namespace and wouldn't appear when querying for all items in the special page.

The patch indeed fixes the issue.

WMDE-leszek moved this task from Review to Done on the Wikidata-Former-Sprint-Board board.

@aude Thanks!

think this issue only happens with items in the main namespace. Otherwise, if the main namespace is wikitext, then the property was created in the main wikitext namespace and wouldn't appear when querying for all items in the special page.

this seems a valid explanation. My setup indeed is wikitext being a main namespace.