Bug 26762

Summary: OPAC hold template markup error
Product: Koha Reporter: Owen Leonard <oleonard>
Component: Hold requestsAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: minor    
Priority: P5 - low CC: 1joynelson, aleisha, bibliwho, david, gmcharlt, jonathan.druart, karen, katrin.fischer, lisettepalouse+koha, liz, lucas, nick, testopia
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
20.11.00, 20.05.06
Bug Depends on: 19718    
Bug Blocks:    
Attachments: Bug 26762: Modify template logic in opac-reserves.tt to avoid error
Bug 26762: Modify template logic in opac-reserves.tt to avoid error
Screenshots - Before and after
Bug 26762: Modify template logic in opac-reserves.tt to avoid error

Description Owen Leonard 2020-10-21 11:40:16 UTC
Bug 19718 introduced a change to the template logic in opac-reserve.tt that is creating invalid markup under some conditions.
Comment 1 Owen Leonard 2020-10-21 11:59:31 UTC
Created attachment 112094 [details] [review]
Bug 26762: Modify template logic in opac-reserves.tt to avoid error

This patch makes a change to the OPAC hold template to prevent certain
cases where the output is invalid.

To reproduce, perform a search in the OPAC which will return some titles
which can be placed on hold and some which cannot.

 - Select all results (some holdable, some not)
 - Click the "Place hold" link
 - On the "Confirm holds" page the layout will be broken after the
   first instance of the message "There are no items that can be placed
   on hold."

To test, apply the patch and repeat the process above. After the patch
has been applied the "confirm holds" page should look correct.
Validating the HTML source should return no errors.
Comment 2 David Nind 2020-10-24 19:32:02 UTC
Created attachment 112392 [details] [review]
Bug 26762: Modify template logic in opac-reserves.tt to avoid error

This patch makes a change to the OPAC hold template to prevent certain
cases where the output is invalid.

To reproduce, perform a search in the OPAC which will return some titles
which can be placed on hold and some which cannot.

 - Select all results (some holdable, some not)
 - Click the "Place hold" link
 - On the "Confirm holds" page the layout will be broken after the
   first instance of the message "There are no items that can be placed
   on hold."

To test, apply the patch and repeat the process above. After the patch
has been applied the "confirm holds" page should look correct.
Validating the HTML source should return no errors.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2020-10-24 19:33:59 UTC
Created attachment 112394 [details]
Screenshots - Before and after

I've added a document with before and after screenshots.
Comment 4 Katrin Fischer 2020-10-25 01:10:46 UTC
Created attachment 112439 [details] [review]
Bug 26762: Modify template logic in opac-reserves.tt to avoid error

This patch makes a change to the OPAC hold template to prevent certain
cases where the output is invalid.

To reproduce, perform a search in the OPAC which will return some titles
which can be placed on hold and some which cannot.

 - Select all results (some holdable, some not)
 - Click the "Place hold" link
 - On the "Confirm holds" page the layout will be broken after the
   first instance of the message "There are no items that can be placed
   on hold."

To test, apply the patch and repeat the process above. After the patch
has been applied the "confirm holds" page should look correct.
Validating the HTML source should return no errors.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Jonathan Druart 2020-10-25 23:09:50 UTC
Pushed to master for 20.11, thanks to everybody involved!
Comment 6 Lucas Gass 2020-11-13 21:44:16 UTC
backported to 20.05.x for 20.05.06
Comment 7 Aleisha Amohia 2020-11-17 05:00:48 UTC
missing dependencies, not backported to 19.11.x