If you try to create a private list from the OPAC and the OpacAllowPublicListCreation is set to 'not allow' public lists to be created by the patron, an error occurs: Koha::Schema::Result::Virtualshelve at /usr/share/koha/lib/Koha/Object.pm line
Created attachment 47981 [details] [review] Bug 15810: Make sure the CGI->param is not called in a list context when creating private shelves This patch fixes the following bug: If OpacAllowPublicListCreation is set to "not allow", the creation of a private list raises an error at the OPAC. CGI->param is called in a list context and some parameters are not filled from the template if the pref is set to "not allow". To make sure we don't have a "Odd number of elements in anonymous hash", we force the context to scalar. Test plan: 1/ Set OpacAllowPublicListCreation to "not allow" 2/ Create private and public lists at the OPAC and the intranet => Everything should work fine with this patch applied
Created attachment 47985 [details] [review] [SIGNED OFF] Bug 15810: Make sure the CGI->param is not called in a list context when creating private shelves This patch fixes the following bug: If OpacAllowPublicListCreation is set to "not allow", the creation of a private list raises an error at the OPAC. CGI->param is called in a list context and some parameters are not filled from the template if the pref is set to "not allow". To make sure we don't have a "Odd number of elements in anonymous hash", we force the context to scalar. Test plan: 1/ Set OpacAllowPublicListCreation to "not allow" 2/ Create private and public lists at the OPAC and the intranet => Everything should work fine with this patch applied Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
I cannot re-create this bug. Is the test plan incomplete, or has this been fixed in master incidentally?
We have tested this on 3.22.3 - there it's definitely a problem. Have you set the system preference? It will hide several options from the form.
(In reply to Katrin Fischer from comment #4) > We have tested this on 3.22.3 - there it's definitely a problem. > Have you set the system preference? It will hide several options from the > form. Yes, I enabled the syspref which made "private" the only list option available. Can you confirm you can recreate the bug on master?
Sorry - can't check right now, will try later.
(In reply to Katrin Fischer from comment #6) > Sorry - can't check right now, will try later. Confirmed the bug. I was looking in the wrong place ; )
Yay! something off the to-do list :)
Created attachment 48232 [details] [review] Bug 15810: Make sure the CGI->param is not called in a list context when creating private shelves This patch fixes the following bug: If OpacAllowPublicListCreation is set to "not allow", the creation of a private list raises an error at the OPAC. CGI->param is called in a list context and some parameters are not filled from the template if the pref is set to "not allow". To make sure we don't have a "Odd number of elements in anonymous hash", we force the context to scalar. Test plan: 1/ Set OpacAllowPublicListCreation to "not allow" 2/ Create private and public lists at the OPAC and the intranet => Everything should work fine with this patch applied Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
pushed to master - should be in the may 2016 release. thanks
Patch pushed to 3.22.x, will be in 3.22.4