Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Syndetics cover fails if record's UPC has a leading zero
Caused by the checksums being wrong. Test plan: On adb, with ktd vanilla test data, we can use record '76' as that has a UPC with a leading zero: http://localhost:8083/Record/76 1) Add valid syndetics settings. 2) Access the record: http://localhost:8083/Record/76 3) Notice the image is not found, this is because this record's UPC is '021561601628', and processImageURL is not identifying the returned image as a "not found" because it doesn't match any of the checksums it's verifying. 4) Apply the patch. Repeat the test plan. You'll need to click "Staff View" -> "Reload Cover" on the record page to clear the cover cache and force the request again but now the image should be displaying correctly. This is because the leading zeroes fail check and the returned image is properly identified as a 'not found' image, so getGroupedWorkCover will then check again but without stripping the leading zeroes, and work then. Finally, I decided to test for the other sizes as well, and noticed all the checksums are wrong, not the just the medium. Possibly caused by a change of default 'not found' images on syndetics' end. To test this, visit the following locally: http://localhost:8083/bookcover.php?id=ils:76&size=small&upc=021561601628&reload=1 http://localhost:8083/bookcover.php?id=ils:76&size=medium&upc=021561601628&reload=1 http://localhost:8083/bookcover.php?id=ils:76&size=large&upc=021561601628&reload=1 None of these work before the fix. All work after the fix.
- Loading branch information