| Summary: | AmazonLocale system preference - add Brazil as an option | ||
|---|---|---|---|
| Product: | Koha | Reporter: | David Nind <david> |
| Component: | OPAC | Assignee: | Jonathan Druart <jonathan.druart> |
| Status: | Signed Off --- | QA Contact: | Testopia <testopia> |
| Severity: | enhancement | ||
| Priority: | P5 - low | CC: | jonathan.druart |
| Version: | Main | ||
| Hardware: | All | ||
| OS: | All | ||
| GIT URL: | Initiative type: | --- | |
| Sponsorship status: | --- | Comma delimited list of Sponsors: | |
| Crowdfunding goal: | 0 | Patch complexity: | --- |
| Documentation contact: | Documentation submission: | ||
| Text to go in the release notes: |
This enhancement lets you manually set the top-level domain using the AmazonLocaleTld system preference (previously AmazonLocale), instead of using a hard-coded predefined list.
Notes:
- AmazonLocale system preference is now renamed to AmazonLocaleTld.
- There is no dropdown list, but you can click on the domains listed under options in the description to add it.
- The system preference is not actually used to retrieve the image, it is used for the link "Amazon cover image (see the original image)" at the bottom of the light box after clicking on the image.
- If AmazonLocale is set and you click the link in the light box, it often leads to a page not found (404) or broken pages on the Amazon country domain.
|
Version(s) released in: | |
| Circulation function: | |||
| Attachments: |
Bug 41318: Rename AmazonLocale to AmazonLocaleTld
Bug 41318: Rename AmazonLocale to AmazonLocaleTld |
||
|
Description
David Nind
2025-11-26 17:38:06 UTC
Created attachment 189988 [details] [review] Bug 41318: Rename AmazonLocale to AmazonLocaleTld To be more flexible we could allow the top-level domain instead of having a predefined list. However this patch still list the different available options (and adds Brazilian) for easy selection. Note that this system preference is not used to retrieve the image but only to link to from the image. Contrary to what the reporter of the bug report thought. And actually what I thought as well until I finished to write the patch and started testing it! Anyway now the patch is written, there should not be any changes in behaviour. Most of the time the links are actually broken when not using .com. So I think we either broke the whole feature at some point, or it never really worked. On a separate bug we could eventually have a look at fetching from the locale tld. Test plan: Turn on OPACAmazonCoverImages and AmazonCoverImages http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=5 http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=5 => You see the PBP cover click on it, it opens the lightbox, click "(see the original image)" at the bottom => This is where the syspref AmazonLocale/AmazonLocaleTld acts Modify the syspref's value and confirm that the link is modified and point to the correct domain (leading to 404 or broken pages most of the time, at least in my tests). The "fun" part is that the Brazilian's 404 is also a dog, not the same however :D Created attachment 190000 [details] [review] Bug 41318: Rename AmazonLocale to AmazonLocaleTld To be more flexible we could allow the top-level domain instead of having a predefined list. However this patch still list the different available options (and adds Brazilian) for easy selection. Note that this system preference is not used to retrieve the image but only to link to from the image. Contrary to what the reporter of the bug report thought. And actually what I thought as well until I finished to write the patch and started testing it! Anyway now the patch is written, there should not be any changes in behaviour. Most of the time the links are actually broken when not using .com. So I think we either broke the whole feature at some point, or it never really worked. On a separate bug we could eventually have a look at fetching from the locale tld. Test plan: Turn on OPACAmazonCoverImages and AmazonCoverImages http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=5 http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=5 => You see the PBP cover click on it, it opens the lightbox, click "(see the original image)" at the bottom => This is where the syspref AmazonLocale/AmazonLocaleTld acts Modify the syspref's value and confirm that the link is modified and point to the correct domain (leading to 404 or broken pages most of the time, at least in my tests). Signed-off-by: David Nind <david@davidnind.com> |