Bug 34314 - CustomCoverImagesURL doesn't work if there are more than one placeholder
Summary: CustomCoverImagesURL doesn't work if there are more than one placeholder
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-07-19 21:02 UTC by Caroline Cyr La Rose
Modified: 2023-07-19 21:02 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
A MARC21 record for a Project Gutenberg title (745 bytes, text/plain)
2023-07-19 21:02 UTC, Caroline Cyr La Rose
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2023-07-19 21:02:23 UTC
Created attachment 153692 [details]
A MARC21 record for a Project Gutenberg title

I was trying to test CustomCoverImages with images from Project Gutenberg and leslibraires.ca, and I can't seem to make it work. I'm wondering if it's because in those two cases, the URL must have two placeholders.

I added a Project Gutenberg MARC21 record to test.

It's specific image is https://www.gutenberg.org/cache/epub/1736/pg1736.cover.medium.jpg 
The 1736 is the PG number, which is in 001.

For leslibraires.ca, it's a similar situation, where the URL contains the ISBN twice.

To test:

1. Import the attached record
   1.1. Download the record
   1.2. In the staff interface, go to Cataloging > Stage records for import
   1.3. Choose the file
   1.4. Click Upload file
   1.5. Click Stage for import
   1.6. (Wait until the job is done)
   1.7. Click View batch
   1.8. Click Import this batch into the catalog
   1.9. (Wait until the job is done)

2. Set up CustomCoverImages
   2.1. Go to Administration > System preferences
   2.2. Search for CustomCoverImages
   2.3. Set up the prefs as follows
        - CustomCoverImages : Show
        - OPACCustomCoverImages : Show
        - CustomCoverImagesURL : https://www.gutenberg.org/cache/epub/{001}/pg{001}.cover.medium.jpg
   2.4. Click Save all enhanced content preferences

3. View the record in the staff interface
   3.1. Search the catalog for Shakespeare or Lord Cromwell
   --> No cover image

4. View the record in the OPAC
   4.1. Click on OPAC view: Open in new window.
   --> No image