Template talk:British-Museum-db
Template testcases[edit]
I recently edited the template to use a more up-to-date HTTPS URL for generating links to museum objects. However, I subsequently had second thoughts and I reverted the edit. In particular, I was not sure about being able to comprehensively test the template with the new URL. If there were a set of testcases that could be used to determine if the template is working, that would be useful.
Here are some possible testcases that I came up with from looking at the template code:
{{British-Museum-db|EA24787}}
BM EA24787{{British-Museum-db|EA24787|111517}}
EA24787{{British-Museum-db|id=111517}}
British Museum Collections Database{{British-Museum-db|id=111517|EA24787}}
EA24787{{British-Museum-db|1=EA24787|2=111517}}
EA24787{{British-Museum-db|2=111517|1=EA24787}}
EA24787{{British-Museum-db|EA24787|id=111517}}
EA24787
(As URLs go, it appears that the "Help using the Museum number and provenance search" URL in the template generates a series of HTTP 301 redirects to this URL.)
--Gazebo (talk) 09:52, 29 March 2019 (UTC)
- Thanks for the extra thoughts on testing. I noticed the original change, and had my doubts. The BM database was designed and implemented quite a while back, so there may easily be issues with revising links and redirects. --Fæ (talk) 10:01, 29 March 2019 (UTC)
Links fail due to redesign of the British Museum collections website[edit]
The British Museum have redesigned their website, and unfortunately broken our template. Here is a test case for File:Early writing tablet recording the allocation of beer.jpg:
- Using {{British-Museum-db}}: 1989,0130.4 "Sorry we can't find that page..."
- Search the new collection site using accession number: https://www.britishmuseum.org/collection/search?museum_number=1989,0130.4 (but you need to click through for full details)
- Search the new collection site using our object number: https://www.britishmuseum.org/collection/search?museum_number=327218 "Your search returned no results"
- Search the new collection site using new museum number: https://www.britishmuseum.org/collection/search?museum_number=140855 (but you need to click through for full details)
- Direct link based on accession number: https://www.britishmuseum.org/collection/object/W_1989-0130-4
As the "object number" we use seems to have now been replaced by a different "museum number", it is not possibly to fix the issue by simply replacing "http://www.britishmuseum.org/research/search_the_collection_database/search_object_details.aspx?objectid=" with "https://www.britishmuseum.org/collection/search?museum_number=". Maybe it is possibly to algorithmically construct the direct url from the accession number in all cases, but I somehow doubt it. If we could get a mapping table from object numbers to museum numbers from the British Museum, then we could just change the url in this template, and get a bot to change all 'objectid' values in {{British-Museum-object}} to the new museum number. BabelStone (talk) 11:18, 15 October 2020 (UTC)
- I updated the link to the search page at least, still need to update the template link. Link for former 1928.1009.378 is now: https://www.britishmuseum.org/collection/object/W_1928-1009-378 so need to replace . by - via a regexp and prefix by W_ + the full path.Popolon (talk) 13:25, 5 September 2021 (UTC)