Last modified: 2012-08-21 20:10:18 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 T41540, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39540 - 'lat' and 'lon' are 0 when the value is NULL in the database JSON output
'lat' and 'lon' are 0 when the value is NULL in the database JSON output
Status: RESOLVED FIXED
Product: Wiki Loves Monuments
Classification: Unclassified
API (Other open bugs)
unspecified
All All
: Unprioritized normal
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks: 39476
  Show dependency treegraph
 
Reported: 2012-08-21 19:35 UTC by Maarten Dammers
Modified: 2012-08-21 20:10 UTC (History)
1 user (show)

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


Attachments

Description Maarten Dammers 2012-08-21 19:35:35 UTC
mysql> SELECT lat,lon FROM monuments_all WHERE lang='ru' AND country='ru' AND
id=7800000000;
+------+------+
| lat  | lon  |
+------+------+
| NULL | NULL |
+------+------+
1 row in set (0.03 sec)

"monuments": [

    {
        "country": "ru",
        "lang": "ru",
        "id": "7800000000",
        "adm0": "ru",
        "adm1": null,
        "adm2": null,
        "adm3": null,
        "adm4": null,
        "name": "Дом, в котором жили в 1924—1934 гг. Лебедев С. В. и Остроумова-Лебедева А. П.",
        "address": "Академика Лебедева ул., 10-г, кв. 4",
        "municipality": "",
        "lat": 0,
        "lon": 0,
        "image": "",
        "source": "http://ru.wikipedia.org/w/index.php?title=Проект:Санкт-Петербург/Википедия_любит_Петербург/Калининский_район&redirect=no&useskin=monobook&oldid=41682759",
        "monument_article": "",
        "registrant_url": "",
        "changed": "2012-08-21 16:54:57"
    },

The lat and the lon should be null.

(This is not the same as 37422, that's about how to store it in the database)
Comment 1 Maarten Dammers 2012-08-21 19:44:17 UTC
[21:40:39] <multichill> brion: https://fisheye.toolserver.org/browse/erfgoed/api/includes/FormatJson.php?hb=true ?
[21:41:14] <brion> multichill, MaxSem - yeah in outputRow() there is a (float) cast on lat and lon
Comment 2 Max Semenik 2012-08-21 20:10:18 UTC
Fixed in r875.

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


Navigation
Links