[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

tobias.gritschac...@wikimedia.de changed:

   What|Removed |Added

   Priority|Unprioritized   |High
 Whiteboard||u=dev c=backend p=0
   Severity|normal  |major

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

tobias.gritschac...@wikimedia.de changed:

   What|Removed |Added

 Whiteboard|u=dev c=backend p=0 |u=dev c=backend p=5
   ||s=2014-09-23

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

tobias.gritschac...@wikimedia.de changed:

   What|Removed |Added

 Status|NEW |ASSIGNED

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

Aude  changed:

   What|Removed |Added

 CC||aude.w...@gmail.com

--- Comment #1 from Aude  ---
In the old serializers in lib, Claim(De)Serializer has:

if ( array_key_exists( 'id', $serialization ) ) {   
  $claim->setGuid( $serialization['id'] );  
}

so it was optional.

this place in the code does not have any knowledge about what entity we are
concerned with and thus don't see nice way to provide fallback and generate
one.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

--- Comment #2 from Aude  ---
in order to use new WikibaseDataModelSerialization component for this, we need
https://github.com/wmde/WikibaseDataModelSerialization/issues/88 solved and
even then, still think we have the issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-25 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

--- Comment #3 from Aude  ---
I removed the claim guid from one of my items, by modifying the item blob in my
database.  Using the currently deployed code (mw1.24-wmf19), the item also
fails to display and instead get unexpected exception.

If this always fails with the old code we have deployed, then think we would
already be aware of this issue before.

i am curious how such an item got created via api?


Unexpected non-MediaWiki exception encountered, of type
"InvalidArgumentException"
[6a87291b] /wiki/Q901 Exception from line 88 of
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model/src/Claim/Claims.php:
Can't handle claims with no GUID set!
Backtrace:
#0
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model/src/Claim/Claims.php(312):
Wikibase\DataModel\Claim\Claims->getClaimKey(Wikibase\DataModel\Claim\Statement)
#1 [internal function]: Wikibase\DataModel\Claim\Claims->offsetSet(NULL,
Wikibase\DataModel\Claim\Statement)
#2
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model/src/Claim/Claims.php(158):
ArrayObject->append(Wikibase\DataModel\Claim\Statement)
#3
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model/src/Claim/Claims.php(109):
Wikibase\DataModel\Claim\Claims->append(Wikibase\DataModel\Claim\Statement)
#4
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model-serialization/src/Deserializers/ClaimsDeserializer.php(48):
Wikibase\DataModel\Claim\Claims->addClaim(Wikibase\DataModel\Claim\Statement)
#5
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model-serialization/src/Deserializers/ClaimsDeserializer.php(40):
Wikibase\DataModel\Deserializers\ClaimsDeserializer->getDeserialized(array)
#6
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model-serialization/src/Deserializers/EntityDeserializer.php(140):
Wikibase\DataModel\Deserializers\ClaimsDeserializer->deserialize(array)
#7
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model-serialization/src/Deserializers/EntityDeserializer.php(67):
Wikibase\DataModel\Deserializers\EntityDeserializer->setClaimsFromSerialization(array,
Wikibase\DataModel\Entity\Item)
#8
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/data-model-serialization/src/Deserializers/EntityDeserializer.php(51):
Wikibase\DataModel\Deserializers\EntityDeserializer->getDeserialized(array)
#9
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/serialization/serialization/src/Deserializers/DispatchingDeserializer.php(42):
Wikibase\DataModel\Deserializers\EntityDeserializer->deserialize(array)
#10
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/internal-serialization/src/Deserializers/EntityDeserializer.php(58):
Deserializers\DispatchingDeserializer->deserialize(array)
#11
/Library/WebServer/Documents/php-master/extensions/Wikidata/vendor/wikibase/internal-serialization/src/Deserializers/EntityDeserializer.php(38):
Wikibase\InternalSerialization\Deserializers\EntityDeserializer->fromCurrentSerialization()
#12
/Library/WebServer/Documents/php-master/extensions/Wikidata/extensions/Wikibase/lib/includes/store/EntityContentDataCodec.php(228):
Wikibase\InternalSerialization\Deserializers\EntityDeserializer->deserialize(array)
#13
/Library/WebServer/Documents/php-master/extensions/Wikidata/extensions/Wikibase/repo/includes/content/EntityHandler.php(368):
Wikibase\Lib\Store\EntityContentDataCodec->decodeEntity(string, string)
#14 /Library/WebServer/Documents/php-master/includes/Revision.php(1067):
Wikibase\EntityHandler->unserializeContent(string, string)
#15 /Library/WebServer/Documents/php-master/includes/Revision.php(1015):
Revision->getContentInternal()
#16 /Library/WebServer/Documents/php-master/includes/page/WikiPage.php(679):
Revision->getContent(integer, NULL)
#17 /Library/WebServer/Documents/php-master/includes/page/WikiPage.php(496):
WikiPage->getContent()
#18 [internal function]: WikiPage->isRedirect()
#19 /Library/WebServer/Documents/php-master/includes/page/Article.php(2002):
call_user_func_array(array, array)
#20 /Library/WebServer/Documents/php-master/includes/MediaWiki.php(350):
Article->__call(string, array)
#21 /Library/WebServer/Documents/php-master/includes/MediaWiki.php(350):
Article->isRedirect()
#22 /Library/WebServer/Documents/php-master/includes/MediaWiki.php(279):
MediaWiki->initializeArticle()
#23 /Library/WebServer/Documents/php-master/includes/MediaWiki.php(584):
MediaWiki->performRequest()
#24 /Library/WebServer/Documents/php-master/includes/MediaWiki.php(435):
MediaWiki->main()
#25 /Library/WebServer/Documents/php-master/index.php(46): MediaWiki->run()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wik

[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

Daniel Kinzler  changed:

   What|Removed |Added

 CC||daniel.kinz...@wikimedia.de

--- Comment #4 from Daniel Kinzler  ---
The main problem seems to me that we require "qualified" GUIDs (with the entity
ID as a prefix) to be stored in the Statements. That makes it hard to generate
a correct GUID in the places where we'd need to do this (like in the
deserializer, as a fallback).

We use qualified GUIDs to allow us to identify the Entity the Statement belongs
to just by looking at the GUID. That makes the API somewhat simpler. For
consistency, it's nice to have the fully qualified GUID in the JSON blob, so
people can just take the GUID from the blob and use it in an API call. That's
why we have Q123$A2DC667C3... as GUIDs.

I do not see a good way to fix the current situation in a backwards compatible
way, without the serializer and/or deserializer for statements knowing about
the "present" entity ID, so GUIDs can be generated (or amended to become
"qualified" for output, in case we'd be storing unqualified GUIDs in the
future).


One thing we could do is using a fake prefix when generating GUIDs for
broken/incomplete Statement serializations - e.g. BAD$DEAFBEEFDEADBEEF. That
should at least allow us to deserialize and display the statements. They would
not be editable using that GUID, though.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

--- Comment #5 from Aude  ---
I think this is probably a won't fix.

1) if this bug (failure to deserialize an entity) happens on currently deployed
code, then think it's likely we already would be aware of it.

2) I am able to deserialize everything from a dump (may 26) using master
Wikibase, which makes me think we have no such items in Wikidata. I might try
with newer (but before serialization switch) dump.

If we really want a 'fix', maybe hack in what daniel suggests and add debug /
deprecation logging which we could actually collect in production so we have
more information about the issue.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-26 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

--- Comment #6 from Aude  ---
also, i tried on currently deployed code (and master) to add claims without
guids using wbeditentity and wbsetclaim.  It wasn't possible to do so.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l


[Bug 71291] Unexpected non-MediaWiki exception: Can't handle claims with no GUID set!

2014-09-30 Thread bugzilla-daemon
https://bugzilla.wikimedia.org/show_bug.cgi?id=71291

Lydia Pintscher  changed:

   What|Removed |Added

 Status|ASSIGNED|RESOLVED
 CC||lydia.pintscher@wikimedia.d
   ||e
 Resolution|--- |WONTFIX

--- Comment #7 from Lydia Pintscher  ---
wontfix as discussed with Katie

-- 
You are receiving this mail because:
You are on the CC list for the bug.
___
Wikibugs-l mailing list
Wikibugs-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l