If for some reason a mismatch between Snak's value's data value type and Snak's property's data type's data value type appears in the defined Snaks of a page, this will cause JavaScript errors in the snakview.
This should be handled by displaying a message instead. This can happen for various reasons, e.g.:
- A property's data type has been changed
- A data type definition has changed (in the PHP code) and uses a different data value type now
- Someone (e.g. gadget developer) sets such an unfitting data value to the jQuery.wikibase.valueview widget directly.
I just ran into this when we internally changed the wikibase-item data type to use the new entity ID data value instead of the String data value.
When we are in production, changes like this would require some script to convert all of the old data values to data value of the new data value type. For displaying stuff nicely in the meantime and in case there is not such script or in case an admin had to change a property's data type for some reason, we should just prevent the JS from failing and display some simple message. Perhaps even display the value but with a message on top and when clicking edit, the right valueview widget for insertion of a value of the right data value type.
Version: unspecified
Severity: normal
Whiteboard: Storypoints: 5