get_syndetics_index is missing the error handling code that is present in the other routines. Thereofre, if an idnex is not found for the particular item, then XML::Simple attempts to parse the large html document that is returned.
Created attachment 31318 [details] [review] Bug 12858: Add error handling to Syndetics Index * Syndetics routines include a statement to check that the returned content from Syndetics is xml. The get_syndetics_index routine was missing this check and so when a 'not found' html page was returned the opac-detail page would take a long time to load whilst xml::simple attempted to parse the large html document. Test Plan 1. Enable Syndetics indexes on opac. 2. Head over to an opac-detail page on the opac. 3. Remove the ISBN from the same item in the staff client. 4. Reload the opac-detail page for the item noticeing a much slower page load. 5. Apply the patch 6. Reload the opac-detail page for the item and note that it now laods in a reasonable timescale again.
*** This bug has been marked as a duplicate of bug 12857 ***
Sorry, wrong way around, trying again.
Created attachment 36010 [details] [review] Bug 12858: Add error handling to Syndetics Index * Syndetics routines include a statement to check that the returned content from Syndetics is xml. The get_syndetics_index routine was missing this check and so when a 'not found' html page was returned the opac-detail page would take a long time to load whilst xml::simple attempted to parse the large html document. Test Plan 1. Enable Syndetics indexes on opac. 2. Head over to an opac-detail page on the opac. 3. Remove the ISBN from the same item in the staff client. 4. Reload the opac-detail page for the item noticeing a much slower page load. 5. Apply the patch 6. Reload the opac-detail page for the item and note that it now laods in a reasonable timescale again. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>
Since I don't have a syndetics account, I am not able to test this patch. But I am wondering if get_syndetics_index could return directly if no isbn is given, it'd avoid a call to the webservice.
Created attachment 36072 [details] [review] [PASSED QA] Bug 12858: Add error handling to Syndetics Index * Syndetics routines include a statement to check that the returned content from Syndetics is xml. The get_syndetics_index routine was missing this check and so when a 'not found' html page was returned the opac-detail page would take a long time to load whilst xml::simple attempted to parse the large html document. Test Plan 1. Enable Syndetics indexes on opac. 2. Head over to an opac-detail page on the opac. 3. Remove the ISBN from the same item in the staff client. 4. Reload the opac-detail page for the item noticeing a much slower page load. 5. Apply the patch 6. Reload the opac-detail page for the item and note that it now laods in a reasonable timescale again. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 36073 [details] [review] [PASSED QA] Bug 12858 [QA Followup] - Don't call webservice if we have no data Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Created attachment 36074 [details] [review] [PASSED QA] Bug 12858 [QA Followup] - Don't call webservice if we have no data Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Patches pushed to master. Thanks Martin!
Pushed to 3.18.x will be in 3.18.4
Pushed to 3.16.x, will be in 3.16.8
Pushed to 3.14, will be in 3.14.15.