thiemowmde added projects: DataValues, Regression.
thiemowmde added subscribers: Lucas_Werkmeister_WMDE, Addshore, Lydia_Pintscher.
thiemowmde added a comment.

There are indeed coordinate values in the database the current code can not deserialize any more: https://www.wikidata.org/wiki/Special:Diff/135258698

In 2017 two changes to the validation of coordinates have been made via https://github.com/DataValues/Geo/pull/53:

  1. "Precision" must be in the range [-360..+360]. Back then @Lucas_Werkmeister_WMDE helped finding outliers in the wikidata.org database and fix them before the change went live.
  2. "Globe" can not be an empty string any more.

I'm not sure, but I guess we forgot about the later one, and empty globes are what causes these errors now. If this is true, then one possible way to fix this is to make the following change to GlobeCoordinateValue::newFromArray:

( isset( $data['globe'] ) ) ? $data['globe'] : null

( isset( $data['globe'] ) && $data['globe'] !== '' ) ? $data['globe'] : null

This will make the code accept empty strings from old serializations, but not via the constructor, which is relevant for the GlobeCoordinateParser.


TASK DETAIL
https://phabricator.wikimedia.org/T144248

EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/

To: thiemowmde
Cc: Lydia_Pintscher, Addshore, Lucas_Werkmeister_WMDE, Krinkle, thiemowmde, Aklapper, Dereckson, Lahi, Gq86, GoranSMilovanovic, Jayprakash12345, Jrbranaa, QZanden, LawExplorer, Wong128hk, Wikidata-bugs, aude, Jdforrester-WMF, Mbch331, Jay8g, Krenair
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to