Bug 12858

Summary: Syndetics index apreciably slow page load for items without result at Syndetics
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: OPACAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: chris, fridolin.somers, jonathan.druart, katrin.fischer, mtj, nengard, tomascohen
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 12858: Add error handling to Syndetics Index
Bug 12858: Add error handling to Syndetics Index
[PASSED QA] Bug 12858: Add error handling to Syndetics Index
[PASSED QA] Bug 12858 [QA Followup] - Don't call webservice if we have no data
[PASSED QA] Bug 12858 [QA Followup] - Don't call webservice if we have no data

Description Martin Renvoize 2014-09-02 09:14:28 UTC
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.
Comment 1 Martin Renvoize 2014-09-02 09:22:22 UTC Comment hidden (obsolete)
Comment 2 Katrin Fischer 2015-01-06 20:50:56 UTC

*** This bug has been marked as a duplicate of bug 12857 ***
Comment 3 Katrin Fischer 2015-01-06 20:51:38 UTC
Sorry, wrong way around, trying again.
Comment 4 Chris Cormack 2015-02-19 08:44:55 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2015-02-20 09:15:13 UTC
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.
Comment 6 Kyle M Hall 2015-02-20 12:25:56 UTC
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>
Comment 7 Kyle M Hall 2015-02-20 12:26:07 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2015-02-20 12:27:37 UTC
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>
Comment 9 Tomás Cohen Arazi 2015-02-20 14:14:57 UTC
Patches pushed to master.

Thanks Martin!
Comment 10 Chris Cormack 2015-02-22 23:12:37 UTC
Pushed to 3.18.x will be in 3.18.4
Comment 11 Mason James 2015-02-26 05:13:22 UTC
Pushed to 3.16.x, will be in 3.16.8
Comment 12 Fridolin Somers 2015-04-02 09:04:48 UTC
Pushed to 3.14, will be in 3.14.15.