Template talk:British-Museum-db

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

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:

(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)[reply]

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. -- (talk) 10:01, 29 March 2019 (UTC)[reply]

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:

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)[reply]

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)[reply]