[Bug 9040] New: uninitialized value in concatenation error in Opac-detail.tt
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Priority: P5 - low Change sponsored?: --- Bug ID: 9040 Assignee: oleonard@myacpl.org Summary: uninitialized value in concatenation error in Opac-detail.tt Severity: normal Classification: Unclassified OS: All Reporter: hblancoca@gmail.com Hardware: All Status: NEW Version: 3.8 Component: OPAC Product: Koha Version 3.8.6 The following error appears on opac-error log [error] opac-detail.pl: Use of uninitialized value in concatenation (.) or string at /usr/share/koha386/opac/htdocs/opac-tmpl/prog/es-ES/modules/opac-detail.tt line 494., referer: http://10.10.22.205/cgi-bin/koha/opac-search.pl?idx=kw&q=colombi a&offset=140&sort_by=relevance_dsc Occurs when i do a search and pick in the results to view a item detail. I review the source code but the error is in line 492 <td>[% ITEM_RESULT.datedue | $KohaDates %]</td>, in the first line of the script appear [% USE KohaDates %] Any idea? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I think if you wrapped the line <td>[% ITEM_RESULT.datedue | $KohaDates %]</td> into an IF checking for existance of the date_due that should probably fix it. I have seen that happen in another couple of places, maybe it could be fixed on plugin level? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Assignee|oleonard@myacpl.org |nunyo@masmedios.com --- Comment #2 from Nuño López Ansótegui <nunyo@masmedios.com> --- Created attachment 15605 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15605&action=edit Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.8 |master -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15605|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 15748 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15748&action=edit Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA CC| |jonathan.druart@biblibre.co | |m --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #2)
Created attachment 15605 [details] [review] Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt
Hello Nuño, Is this patch only for 3.8.x? I didn't reproduce the issue on master and the patch does not apply on 3.8.x. In all cases, I think the patch is not good. The test would be on each td: <td class="date_due">[% IF ( ITEM_RESULT.datedue ) %][% ITEM_RESULT.datedue | $KohaDates %][% END %]</td> not on the tr element. Marked as Failed QA. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #5 from Nuño López Ansótegui <nunyo@masmedios.com> --- (In reply to comment #4)
(In reply to comment #2)
Created attachment 15605 [details] [review] [review] Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt
Hello Nuño,
Is this patch only for 3.8.x? I didn't reproduce the issue on master and the patch does not apply on 3.8.x. In all cases, I think the patch is not good. The test would be on each td: <td class="date_due">[% IF ( ITEM_RESULT.datedue ) %][% ITEM_RESULT.datedue | $KohaDates %][% END %]</td> not on the tr element.
Marked as Failed QA.
This patch is for the master. I have done this as was done in other cases, for example in barcode. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #6 from Jonathan Druart <jonathan.druart@biblibre.com> --- In which cases do you see warning messages? On opac-detail.pl, I just get some warnings about $ccode (Use of uninitialized value $ccode in exists at /home/koha/src/opac/opac-detail.pl line 534). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #7 from Nuño López Ansótegui <nunyo@masmedios.com> --- (In reply to comment #6)
In which cases do you see warning messages?
On opac-detail.pl, I just get some warnings about $ccode (Use of uninitialized value $ccode in exists at /home/koha/src/opac/opac-detail.pl line 534).
I meant that I have written the code like the other tests, for example as the barcode code: [% IF ( itemdata_datedue ) %]<td class="date_due">[% ITEM_RESULT.datedue | $KohaDates %]</td>[% END %] [% IF ( OPACShowBarcode ) %]<td class="barcode">[% ITEM_RESULT.barcode %]</td>[% END %] if $ccode get a warning, must also fix it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #8 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #7)
(In reply to comment #6)
In which cases do you see warning messages?
On opac-detail.pl, I just get some warnings about $ccode (Use of uninitialized value $ccode in exists at /home/koha/src/opac/opac-detail.pl line 534).
I meant that I have written the code like the other tests, for example as the barcode code:
[% IF ( itemdata_datedue ) %]<td class="date_due">[% ITEM_RESULT.datedue | $KohaDates %]</td>[% END %] [% IF ( OPACShowBarcode ) %]<td class="barcode">[% ITEM_RESULT.barcode %]</td>[% END %]
if $ccode get a warning, must also fix it.
Since I cannot reproduce, I cannot help you. You can keep your code but if the error is caused by the KohaDates plugin you have to check the existence of the variable before filtering it : [% IF ( itemdata_datedue ) %]<td class="date_due">[% IF ITEM_RESULT.datedue%][% ITEM_RESULT.datedue | $KohaDates %][% END %]</td>[% END %] -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #9 from Nuño López Ansótegui <nunyo@masmedios.com> --- (In reply to comment #8)
(In reply to comment #7)
(In reply to comment #6)
In which cases do you see warning messages?
On opac-detail.pl, I just get some warnings about $ccode (Use of uninitialized value $ccode in exists at /home/koha/src/opac/opac-detail.pl line 534).
I meant that I have written the code like the other tests, for example as the barcode code:
[% IF ( itemdata_datedue ) %]<td class="date_due">[% ITEM_RESULT.datedue | $KohaDates %]</td>[% END %] [% IF ( OPACShowBarcode ) %]<td class="barcode">[% ITEM_RESULT.barcode %]</td>[% END %]
if $ccode get a warning, must also fix it.
Since I cannot reproduce, I cannot help you. You can keep your code but if the error is caused by the KohaDates plugin you have to check the existence of the variable before filtering it :
[% IF ( itemdata_datedue ) %]<td class="date_due">[% IF ITEM_RESULT.datedue%][% ITEM_RESULT.datedue | $KohaDates %][% END %]</td>[% END %]
Ok, but I check the existence of the variable in [% IF ( itemdata_datedue ) %] I Would not checking the same variable two times? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #10 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to comment #9)
Ok, but I check the existence of the variable in [% IF ( itemdata_datedue ) %]
I Would not checking the same variable two times?
itemdata_datedue is true if at least one datedue is defined in the ITEM_RESULT array. It is not the same variable at all. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #11 from Nuño López Ansótegui <nunyo@masmedios.com> --- It's true, you are right...sorry, I fix it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15748|0 |1 is obsolete| | --- Comment #12 from Nuño López Ansótegui <nunyo@masmedios.com> --- Created attachment 15797 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15797&action=edit Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 --- Comment #13 from Jonathan Druart <jonathan.druart@biblibre.com> --- Comment on attachment 15797 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15797 Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt Review of attachment 15797: --> (http://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=9040&attachment=15797) ----------------------------------------------------------------- ::: koha-tmpl/opac-tmpl/prog/en/modules/opac-detail.tt @@ +1480,4 @@
[% IF ( itemdata_copynumber ) %]<td class="copynumber">[% ITEM_RESULT.copynumber %]</td>[% END %] <td class="status">[% INCLUDE 'item-status.inc' item = ITEM_RESULT %]</td> [% IF ( itemdata_itemnotes ) %]<td class="notes">[% ITEM_RESULT.itemnotes %]</td>[% END %] + [% IF ( itemdata_datedue ) %]<td class="date_due">[% IF ITEM_RESULT.datedue %][% ITEM_RESULT.datedue | $KohaDates %]</td>[% END %]
tag END missing for the first IF statement -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #15797|0 |1 is obsolete| | --- Comment #14 from Nuño López Ansótegui <nunyo@masmedios.com> --- Created attachment 15799 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=15799&action=edit Bug 9040 - uninitialized value in concatenation error in Opac-detail.tt thanks! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #15 from Owen Leonard <oleonard@myacpl.org> --- I don't see this error in my OPAC logs from general OPAC use. Please revise your patch to include a test plan, including steps to reproduce the error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Nuño López Ansótegui <nunyo@masmedios.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |m.de.rooy@rijksmuseum.nl --- Comment #16 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to comment #15)
I don't see this error in my OPAC logs from general OPAC use. Please revise your patch to include a test plan, including steps to reproduce the error.
Changing status of this report to reflect the need for clarification. See above request. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9040 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |RESOLVED CC| |tomascohen@gmail.com Resolution|--- |DUPLICATE --- Comment #17 from Tomás Cohen Arazi <tomascohen@gmail.com> --- *** This bug has been marked as a duplicate of bug 7937 *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org