Last modified: 2013-06-26 12:39:33 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 T51498, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 49498 - Invalid GeoCoordinateValue fatal error
Invalid GeoCoordinateValue fatal error
Status: VERIFIED FIXED
Product: MediaWiki extensions
Classification: Unclassified
WikidataRepo (Other open bugs)
master
All All
: Normal normal (vote)
: ---
Assigned To: Wikidata bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-12 19:55 UTC by Aude
Modified: 2013-06-26 12:39 UTC (History)
4 users (show)

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


Attachments

Description Aude 2013-06-12 19:55:51 UTC
If I give the api (e.g. CreateClaim) an invalid value for geocoordinate, it does not get validated.  Instead it fails hard with a fatal error, which gets returned back to me, the bot / api user as a stack trace and obviously gets logged.

I am told that the same error is appearing in the production fatal logs, therefore if there is a reasonable way that we can patch it, we should and backport it asap.

A more overall approach to better value validation, as described in bug 49263, is needed soon as possible though would be too drastic of a change for backporting.

PHP Catchable fatal error:  Argument 1 passed to DataValues\\GeoCoordinateValue::newFromArray() must be an array, null given, called in /var/www/common/wikibase-repo/extensions/DataValues/DataValues/includes/DataValueFactory.php on line 102 and defined in /var/www/common/wikibase-repo/extensions/DataValues/DataValues/includes/values/GeoCoordinateValue.php on line 281
PHP Stack trace:                         
PHP   1. {main}() /var/www/common/wikibase-repo/api.php:0
PHP   2. ApiMain->execute() /var/www/common/wikibase-repo/api.php:73
PHP   3. ApiMain->executeActionWithErrorHandling() /var/www/common/wikibase-repo/includes/api/ApiMain.php:351
PHP   4. ApiMain->executeAction() /var/www/common/wikibase-repo/includes/api/ApiMain.php:380
PHP   5. Wikibase\\Api\\CreateClaim->execute() /var/www/common/wikibase-repo/includes/api/ApiMain.php:840
PHP   6. Wikibase\\Api\\CreateClaim->getSnakInstance() /var/www/common/wikibase-repo/extensions/Wikibase/repo/includes/api/CreateClaim.php:67
PHP   7. Wikibase\\SnakFactory->newSnak() /var/www/common/wikibase-repo/extensions/Wikibase/repo/includes/api/CreateClaim.php:190
PHP   8. Wikibase\\PropertyValueSnak::newFromPropertyValue() /var/www/common/wikibase-repo/extensions/Wikibase/DataModel/DataModel/Snak/SnakFactory.php:53
PHP   9. Wikibase\\Property->newDataValue() /var/www/common/wikibase-repo/extensions/Wikibase/DataModel/DataModel/Snak/PropertyValueSnak.php:151
PHP  10. DataValues\\DataValueFactory->newDataValue() /var/www/common/wikibase-repo/extensions/Wikibase/DataModel/DataModel/Entity/Property.php:177
PHP  11. DataValues\\GeoCoordinateValue::newFromArray() /var/www/common/wikibase-repo/extensions/DataValues/DataValues/includes/DataValueFactory.php:102


Depending on what I feed the api, am also able to get:

PHP Catchable fatal error:  Argument 1 passed to DataValues\\GeoCoordinateValue::newFromArray() must be an array, string given, called in /var/www/common/wikibase-repo/extensions/DataValues/DataValues/includes/DataValueFactory.php on line 102 and defined in /var/www/common/wikibase-repo/extensions/DataValues/DataValues/includes/values/GeoCoordinateValue.php on line 281
Comment 1 Gerrit Notification Bot 2013-06-13 12:11:00 UTC
Related URL: https://gerrit.wikimedia.org/r/68367 (Gerrit Change I4d6b27adfd8f8f6320c5029fde0a6a2a835c31d6)
Comment 2 Gerrit Notification Bot 2013-06-13 12:11:35 UTC
Related URL: https://gerrit.wikimedia.org/r/68369 (Gerrit Change I09e54dca33a3d143b1fa0d2f6ccf331ba8241a36)
Comment 3 Daniel Kinzler 2013-06-13 12:14:47 UTC
This is caused by a) overly restrictive type hinting in the DataValues extension and b) missing error handling in the Api modules. I see no way to address this with a live hack. Since this does not cause corruption on the only issue is a "dirty" error report, I suggest to leave this for the next deployment.
Comment 4 Gerrit Notification Bot 2013-06-13 15:23:48 UTC
https://gerrit.wikimedia.org/r/68367 (Gerrit Change I4d6b27adfd8f8f6320c5029fde0a6a2a835c31d6) | change APPROVED and MERGED [by Jeroen De Dauw]
Comment 5 Gerrit Notification Bot 2013-06-13 16:08:04 UTC
https://gerrit.wikimedia.org/r/68369 (Gerrit Change I09e54dca33a3d143b1fa0d2f6ccf331ba8241a36) | change APPROVED and MERGED [by Jeroen De Dauw]
Comment 6 abraham.taherivand 2013-06-26 12:39:33 UTC
Verified in Wikidata demo sprint 22-9

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


Navigation
Links