AddedContent: Invalid ISBN's are sent to Content Cafe as blank string
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
2.8 |
Fix Released
|
Medium
|
Unassigned | ||
2.9 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
EG 2.8.4
Hello, I've been trying to figure out why cover art isn't showing up for one particular title and I think I might have found a bug.
Title: Bridge of Spies
ISBN: 9786316271976
Record ID: 197084
https:/
That record used to have several ISBN's and UPC's, I removed all but one to simplify.
Asking for the cover art based on the ISBN works fine:
http://
But asking based on the record id fails: (And the memcache entries have been purged before this test).
http://
I did a packet capture to find out what was being sent/received from Content Cafe when the request based on the record ID was made and found that we were sending a blank request to content cafe. The key/ISBN wasn't being entered.
<?xml version="1.0" encoding="utf-8"?>
<ContentCafe xmlns="http://
Content Cafe returns an error response of "<Error>Invalid key text element: Invalid length (0)</Error>"
So I created a perl script to emulate what the added content handler does, and it worked like it should right up until I added in the Business::ISBN validation. Then I found out that the ISBN I'm testing with fails the Business::ISBN validation because it doesn't have a valid group code.
What seems to be happening is that the invalid ISBN's get passed through as blank keys to the AddedContent handler, which adds them to the request that gets sent to the provider. So one invalid ISBN will prevent any added content from being returned.
$isbn_str = $isbn_obj-
This will return a blank string if the ISBN is invalid.
I'll do some more testing to see what the packet capture looks like when there are multiple keys.
I also want to figure out if that ISBN is really invalid or if the Business:
Josh
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Ok, Now I think I get why this ISBN isn't valid, most DVD's don't qualify for a real ISBN so the ISBN in this case is an unofficial one created by Baker&Taylor for usability and integration purposes. The group code 631 isn't an official number. 978-631-627197-6
Business: :ISBN:: Data doesn't have anything for 631 which is why it fails the ISBN check. cpansearch. perl.org/ src/BDFOY/ Business- ISBN-Data- 20140910. 003/lib/ Business/ ISBN/Data. pm
http://
I just looked through our catalog and for the first 10 I checked, the DVD's with no cover art are ones we purchased through Baker&Taylor and include a unofficial ISBN number.
Does anyone know if excluding unofficial but well formatted ISBN numbers was a goal of using the Business::ISBN validation?
Thanks
Josh