When adding item search fields (Administration > Catalog > Item search fields) in current master, you can only add one new field. If you try and add another one, the body of the page is blank (navigation, etc is still in place). I also checked this on the latest 22.05, and this problem doesn't occur - I can successfully add multiple item search fields. So something has broken this in master. I have also tried in different browsers (Firefox and Google Chrome). To replicate: 1. Go to Administration > Catalog > Item search fields. 2. Click on 'New search field'. 3. Enter required details and submit: ==> table with the item search field added displayed. 4. Repeat step 2: ==> You now get a blank page (navigation, etc is still in place) and no add new item search field form. Identified when testing bug 31406.
Confirmed.
This is related to our changes on the page, but I haven't quite figured out yet what's going on. The visibility of the form on the page is managed with Javascript: $(document).ready(function(){ $("#add_field_form").hide(); $("#new_search_field").on("click",function(e){ e.preventDefault(); $("#add_field_form").show(); $(".dialog").hide(); $("#search_fields_list").hide(); }); $(".hide_form").on("click",function(e){ e.preventDefault(); $("#add_field_form").hide(); $(".dialog").show(); $("#search_fields_list,#toolbar").show(); });
Created attachment 143917 [details] [review] Bug 32126: Fix missing div breaking the form for adding more search fields The missing div caused a problem with the JS that controls visibility of the list of search fields, the form and the toolbar. With the div added, everything should now work as expected. To test: * Add a item search field, everything should work. * Add a second item search field - intead of the form, you'll see an empty page. * Apply patch. * Add second and more search fields, all should work. * Edit search fields. * Delete search fields.
Created attachment 143923 [details] [review] Bug 32126: Fix missing div breaking the form for adding more search fields The missing div caused a problem with the JS that controls visibility of the list of search fields, the form and the toolbar. With the div added, everything should now work as expected. To test: * Add a item search field, everything should work. * Add a second item search field - intead of the form, you'll see an empty page. * Apply patch. * Add second and more search fields, all should work. * Edit search fields. * Delete search fields. Signed-off-by: David Nind <david@davidnind.com>
Thanks Katrin for fixing! I did note (and it was doing it before this patch) that the form very briefly appears then disappears when there are no item search fields, or when going to Administration > Item search fields. Another bug, or just the way this one works? David
Just the way this works - elements get hidden/unhidden with Javascript, that's the flickering you see.
(In reply to Katrin Fischer from comment #6) > Just the way this works - elements get hidden/unhidden with Javascript, > that's the flickering you see. Thanks Katrin!
A major bug, a silly easy fix, but noone to QA? :(
Pushed to master for 22.11. Nice work everyone, thanks!
Pushed to 22.11.x for 22.11.01 release. Thanks everyone.