Description
Elias
2017-11-28 06:54:14 UTC
I do not recreate, the format must be "json", unless you have javascript disabled. Can you confirm you did not disable javascript? This appears to be an issue if there are no CCODE values defined. The column limiting code is malformed and javascript error breaks functionality. Created attachment 69729 [details] [review] Bug 19706 - Fix bad json formed when there are no CCODE values To test: 1 - Delete all ccode values in your system 2 - Load the item search page 3 - View the console and note a js error 4 - Try to perform an item search to screen 5 - Internal server error ("unsupported format 'html'" in logs) 6 - Apply patch 7 - Reload page 8 - Note js error is gone 9 - Perform search to screen, success! Created attachment 69745 [details] [review] Bug 19706: Fix bad json formed when there are no CCODE values To test: 1 - Delete all ccode values in your system 2 - Load the item search page 3 - View the console and note a js error 4 - Try to perform an item search to screen 5 - Internal server error ("unsupported format 'html'" in logs) 6 - Apply patch 7 - Reload page 8 - Note js error is gone 9 - Perform search to screen, success! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Comment on attachment 69745 [details] [review] Bug 19706: Fix bad json formed when there are no CCODE values Review of attachment 69745 [details] [review]: ----------------------------------------------------------------- Sorry, does not work, if you have defined some values in CCODE category, the select is not visible either ::: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt @@ +363,4 @@ > { 'type': 'text' }, > { 'type': 'text' }, > { 'type': 'text' }, > + [% IF ccode.size %] should be ccodes.size (plural) Created attachment 69800 [details] [review] Bug 19706: (followup) - correct variable name 'ccodes' not 'ccode' To test: 1 - Have some values in CCODE authorised values 2 - Ensure collection drop down on item search displays correctly 3 - Ensure item search returns results ot screen with no js errors Created attachment 69831 [details] [review] Bug 19706: Fix bad json formed when there are no CCODE values To test: 1 - Delete all ccode values in your system 2 - Load the item search page 3 - View the console and note a js error 4 - Try to perform an item search to screen 5 - Internal server error ("unsupported format 'html'" in logs) 6 - Apply patch 7 - Reload page 8 - Note js error is gone 9 - Perform search to screen, success! Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Created attachment 69832 [details] [review] Bug 19706: (followup) - correct variable name 'ccodes' not 'ccode' To test: 1 - Have some values in CCODE authorised values 2 - Ensure collection drop down on item search displays correctly 3 - Ensure item search returns results ot screen with no js errors Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Created attachment 69835 [details] [review] Bug 19706: Fix bad json formed when there are no CCODE values To test: 1 - Delete all ccode values in your system 2 - Load the item search page 3 - View the console and note a js error 4 - Try to perform an item search to screen 5 - Internal server error ("unsupported format 'html'" in logs) 6 - Apply patch 7 - Reload page 8 - Note js error is gone 9 - Perform search to screen, success! To test there is no regression: 1 - Have some values in CCODE authorised values 2 - Ensure collection drop down on item search displays correctly 3 - Ensure item search returns results ot screen with no js errors Signed-off-by Owen Leonard <oleonard@myacpl.org> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Created attachment 69836 [details] [review] Bug 19706: (QA follow-up) Hide the collection code selector if no value is defined (for consistency) Test plan: 0) Go to item search 1) Do have some authorized values in CCODE category -> selector of collection is visible 2) Don't have any authorized value in CCODE category -> selector of collection is not visible Signed-off-by: Josef Moravec <josef.moravec@gmail.com> I squashed the two patches to simplify history and added follow-up to make the item search form behave consistant - if there is no ccode value, the selector for collection is not visible on item search form. Pushed to master for 18.05, thanks to everybody involved! Awesome work all! Pushed to stable for 17.11.01 |