From :c:Commons_talk:Monuments_database/Images_without_id
Images without id reports Hall_in_Tirol,_Haus_Unterer_Stadtplatz_8a.jpg as not having an id template despite it having one.
From :c:Commons_talk:Monuments_database/Images_without_id
Images without id reports Hall_in_Tirol,_Haus_Unterer_Stadtplatz_8a.jpg as not having an id template despite it having one.
Running the queries manually in quarry to see where the image shows up and where it doesn't.
Running the script in docker for at_de (after first harvesting):
getMonumentsWithoutTemplate output contains Hall_in_Tirol,_Haus_Unterer_Stadtplatz_8a.jpg
getMonumentsWithPhoto output does not contains Hall_in_Tirol,_Haus_Unterer_Stadtplatz_8a.jpg
Diging into this a bit more the monument database contains Hall_in_Tirol,_Haus_Unterer_Stadtpatz_8a.JPG wheras the file is called Hall_in_Tirol,_Haus_Unterer_Stadtplatz_8a.jpg on Commons.
So the cause is a redirect in this case. The good solution would be to resolve this on harvest, but that is likely expensive.
Looking at the others the majority seem to be redirects or local uploads (some of which also exist on Commons. There is also at least one case of an image being in the monuments database with url encoded characters.
I have the following in my css to make redirects stand out
/* omdirigeringslänkar */ .mw-redirect { color: #008000; } .mw-redirect:visited { color: #006400; }
Redirect and local images could be tested as part of images_without_id. Not sure it's the most suitable place though. @JeanFred any thoughts.
addCommonsTemplate already checks for page existence so resolving redirects and reporting back existence should be doable without any significant overhead.