-
Notifications
You must be signed in to change notification settings - Fork 20
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
Wikipedia navigation doesn't work for leaves without OTTs #905
Comments
Hmm, that's odd. I can imagine that leaves with no OTT in the tree might not have any valid WD QID, but if there is one, I would expect this to work. We should investigate. |
Completely unfamiliar with this code, but I debugged it a bit. In the OTT case, we make this request, which returns all the links including the wiki: http://127.0.0.1:8000/tree/leaf_linkouts.json/206538?form_reservation_code=286f0a88a93&lang=&popup=1 But in the OTT-less case, we end up making this request without passing an OTT (since there isn't one): http://127.0.0.1:8000/tree/leaf_linkouts.json/?form_reservation_code=286f0a88a93&lang=&popup=1 And it doesn't return any of the links, which is not surprising. My guess is that this API is just not able to handle not having an OTT, since that is the key into the leaves table. |
This says it all: def leaf_linkouts():
"""
called with an OTT, since all leaves with info should have an OTT. Any leaves that don't, can't be associated with data
""" |
Ah, thanks for looking into this and apologies for misremembering. It's a long time since I looked at this code! I imagine we could relatively easily modify this though. |
Similar to #907, the client-side is written with an expectation that pop-up URLs have the OTT in. We have Changing this to something like |
If a leaf has no OTT, but has a valid wikidata ID, I would expect it to be able to show the wikipedia page when clicking on the link. But it doesn't work for some reason, and instead pops up the sponsorship page.
Similar to #903, this is a problem with the extinct tree, which has some leaves for which no OTT exists, and that can't get to wikipedia.
The text was updated successfully, but these errors were encountered: