Last modified: 2014-09-11 13:39:31 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T72613, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 70613 - InvalidArgumentException from line 339 of Item.php
InvalidArgumentException from line 339 of Item.php
Status: RESOLVED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
unspecified
All All
: High major (vote)
: ---
Assigned To: Wikidata bugs
u=dev c=backend p=5 s=2014-09-09
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-09-09 16:26 UTC by Aude
Modified: 2014-09-11 13:39 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Aude 2014-09-09 16:26:20 UTC
Unexpected non-MediaWiki exception encountered, of type "InvalidArgumentException"
[970bdbc2] [no req]   Exception from line 339 of /Library/WebServer/Documents/php-master/extensions/WikidataBuild/vendor/wikibase/data-model/src/Entity/Item.php: Claims are not supported any more, use Statements.
Backtrace:
#0 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/vendor/wikibase/internal-serialization/src/Deserializers/LegacyItemDeserializer.php(83): Wikibase\DataModel\Entity\Item->addClaim(Wikibase\DataModel\Claim\Claim)
#1 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/vendor/wikibase/internal-serialization/src/Deserializers/LegacyItemDeserializer.php(53): Wikibase\InternalSerialization\Deserializers\LegacyItemDeserializer->addClaims()
#2 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/vendor/wikibase/internal-serialization/src/Deserializers/LegacyEntityDeserializer.php(34): Wikibase\InternalSerialization\Deserializers\LegacyItemDeserializer->deserialize(array)
#3 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/vendor/wikibase/internal-serialization/src/Deserializers/EntityDeserializer.php(54): Wikibase\InternalSerialization\Deserializers\LegacyEntityDeserializer->deserialize(array)
#4 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/vendor/wikibase/internal-serialization/src/Deserializers/EntityDeserializer.php(35): Wikibase\InternalSerialization\Deserializers\EntityDeserializer->fromLegacySerialization()
#5 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/extensions/Wikibase/lib/includes/store/EntityContentDataCodec.php(228): Wikibase\InternalSerialization\Deserializers\EntityDeserializer->deserialize(array)
#6 /Library/WebServer/Documents/php-master/extensions/WikidataBuild/extensions/Wikibase/repo/includes/content/EntityHandler.php(368): Wikibase\Lib\Store\EntityContentDataCodec->decodeEntity(string, string)
#7 /Library/WebServer/Documents/php-master/includes/Revision.php(1067): Wikibase\EntityHandler->unserializeContent(string, string)
#8 /Library/WebServer/Documents/php-master/includes/Revision.php(1015): Revision->getContentInternal()
#9 /Library/WebServer/Documents/php-master/includes/page/WikiPage.php(679): Revision->getContent(integer, NULL)
#10 /Library/WebServer/Documents/php-master/maintenance/refreshLinks.php(205): WikiPage->getContent(integer)
#11 /Library/WebServer/Documents/php-master/maintenance/refreshLinks.php(160): RefreshLinks->fixRedirect(integer)
#12 /Library/WebServer/Documents/php-master/maintenance/refreshLinks.php(53): RefreshLinks->doRefreshLinks(integer, boolean, integer, integer, boolean, boolean)
#13 /Library/WebServer/Documents/php-master/maintenance/doMaintenance.php(98): RefreshLinks->execute()
#14 /Library/WebServer/Documents/php-master/maintenance/refreshLinks.php(321): require_once(string)
Comment 1 Aude 2014-09-09 16:26:56 UTC
I was trying to run refreshLinks and there is issue with unserializing content in my database.
Comment 2 WikidataBugzilla 2014-09-10 11:40:34 UTC
Commit pushed to statements at https://github.com/wmde/WikibaseInternalSerialization

https://github.com/wmde/WikibaseInternalSerialization/commit/fa15e5a3f0f18aa0a080d70001573c36e4000a45
Normalize claim serialization on Items and use LegacyStatementDeserializer

Problem is that Items might have Claims (e.g. missing 'rank' and 'refs' keys).
Deserializing these now fails on Items. The serialization needs to be 'normalized'
as a Statement to deal with this potential inconsitency in old data.

@todo more tests and clean up of LegacyClaimDeserializer

Bug: 70613
Comment 3 Aude 2014-09-10 11:44:45 UTC
The Item that fails deserializing has Claims on Items. (e.g. no 'rank' in the serialization)

the LegacyClaimDeserializer deserializes it as Claim and then does Item::addClaim() --- horrible deprecated method, btw -- which then does addStatement() and *boom*, it's not a Statement and the item explodes.
Comment 4 Aude 2014-09-10 11:45:16 UTC
btw, I do not know yet how much this is an issue in Wikidata, but likely....
Comment 5 WikidataBugzilla 2014-09-10 12:38:49 UTC
Commit pushed to statements at https://github.com/wmde/WikibaseInternalSerialization

https://github.com/wmde/WikibaseInternalSerialization/commit/64bbf1c2ab79026765536c7e7a2af2c1a35761e2
Normalize claim serialization on Items and use LegacyStatementDeserializer

Problem is that Items might have Claims (e.g. missing 'rank' and 'refs' keys).
Deserializing these now fails on Items. The serialization needs to be 'normalized'
as a Statement to deal with this potential inconsitency in old data.

@todo more tests and clean up of LegacyClaimDeserializer

Bug: 70613
Comment 6 WikidataBugzilla 2014-09-10 13:03:05 UTC
Commit pushed to statements at https://github.com/wmde/WikibaseInternalSerialization

https://github.com/wmde/WikibaseInternalSerialization/commit/3186f093d04b5c1a06fedb9193c5e2c1d4c7217e
Normalize claim serialization on Items and use LegacyStatementDeserializer

Problem is that Items might have Claims (e.g. missing 'rank' and 'refs' keys).
Deserializing these now fails on Items. The serialization needs to be 'normalized'
as a Statement to deal with this potential inconsitency in old data.

@todo more tests and clean up of LegacyClaimDeserializer

Bug: 70613

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links