Created attachment 2646 [details] [review] Patch for opac-detail Certain items were not displaying a description even though they had valid 52x fields in the marc record. This was happening to a number of our records but I haven't been able to narrow down the exact cause of the problem. I attached a patch that fixes the problem on our 3.0.x install. Here is a link to the unpatched version of opac-detail.pl https://library.pennmanor.net/cgi-bin/koha/opac-detail-orig.pl?biblionumber=103230 And to the patched version https://library.pennmanor.net/cgi-bin/koha/opac-detail.pl?biblionumber=103230
Thank you for this bug report. We also have this issue. The exact cause of the problem is calling functions like GetNormalized... in list context. Since they return nothing (in this context an empty list), Perl discards this value and the rest of the list shifts one position forward resulting in a mixup of the parameters passed to template->param. Calling the functions in scalar context before the template->param call as you did in the patch solves the problem. You could also force scalar context with a scalar statement or adding the test ||'' ("OR empty string").
(In reply to comment #1) > Thank you for this bug report. We also have this issue. > The exact cause of the problem is calling functions like GetNormalized... in > list context. Since they return nothing (in this context an empty list), Perl > discards this value and the rest of the list shifts one position forward > resulting in a mixup of the parameters passed to template->param. > Calling the functions in scalar context before the template->param call as you > did in the patch solves the problem. You could also force scalar context with a > scalar statement or adding the test ||'' ("OR empty string"). "Since they return nothing" should of course be: "If they return nothing" Patch sent for 3.0.x. This problem is already solved in 3.2