Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

page_id, thumbnail, and image are sometimes missing from maps #119

Open
Abbe98 opened this issue May 4, 2018 · 5 comments
Open

page_id, thumbnail, and image are sometimes missing from maps #119

Abbe98 opened this issue May 4, 2018 · 5 comments
Labels

Comments

@Abbe98
Copy link
Member

Abbe98 commented May 4, 2018

See the following example from the API where several maps are missing these values:
https://warper.wmflabs.org/api/v1/maps.json?query=stockholm&show_warped=1&per_page=20

I'm noting that these maps have very low ids. Is it possible to reindex this data @timwaters ?

@Abbe98 Abbe98 added the bug label May 4, 2018
@Abbe98
Copy link
Member Author

Abbe98 commented May 4, 2018

Here is a map without a super low id:
https://warper.wmflabs.org/api/v1/maps/102

@timwaters
Copy link

I think the low ID indicates they were in the database before the page id was added, however all should have been migrated.

There are two rake tasks to update page id and thumb url to migrate maps
https://github.com/wikimaps-dev/mapwarper/blob/api_wikimaps/lib/tasks/update_pageid_image_url.rake
https://github.com/wikimaps-dev/mapwarper/blob/api_wikimaps/lib/tasks/update_thumb_url.rake

They both should have been run on the above maps so it could be that they could not be found via the rake task. This might be due to the "unique_id" or decoding and encoding that, possibly.

It could be easier to delete that one and try importing again?

@Abbe98
Copy link
Member Author

Abbe98 commented May 5, 2018

@timwaters there seams to quite a lot of maps with the data missing, if deleted and reimported would their control points remain?

@timwaters
Copy link

timwaters commented May 5, 2018

These could be duplicates also: https://warper.wmflabs.org/maps/102 is the same as https://warper.wmflabs.org/maps/82 (with 82 being the one linked from Commons)

however, The Stockholm centre map https://warper.wmflabs.org/maps/24 on Commons https://commons.wikimedia.org/wiki/File:Stockholm_center_1870.jpg links to: https://warper.wmflabs.org/wikimaps/new?pageid=5877877 so that one hasn't been duplicated

@timwaters
Copy link

timwaters commented Jun 11, 2018

There are 14 maps with no page_id

Map.where(:page_id => nil).pluck(:id)
=> [2, 4, 3, 6, 24, 50, 28, 10, 26, 25, 170, 112, 102, 168]

There were 46 maps with no thumb_url
Map.where(:thumb_url => nil).pluck(:id)
[2, 4, 3, 6, 24, 50, 28, 10, 26, 25, 170, 112, 102, 168, 1895, 1896, 2132, 2133, 2159, 2134, 2135, 2136, 2137, 2138, 2139, 2140, 2141, 2142, 2143, 2144, 2145, 2146, 2147, 2148, 2149, 2150, 2151, 2152, 2153, 2157, 2161, 2158, 2155, 2154, 2160, 2156]

There are 32 maps with a page_id but no thumb_url.

I just ran the update_thumb_url rake task, and those 32 maps got updated, leaving just the 14!

I ran the update_pageid task and 7 maps could have been updated, but there was already a map with a pageid. 50, 28, 10, 170, 112, 102, 168

Duplicates: 50, 28, 10, 170, 112, 102, 168
Orphans: 2, 4, 3, 6, 24, 26, 25

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants