Bug 8035

Summary: bibs with comments show an error in opac
Product: Koha Reporter: Nicole C. Engard <nengard>
Component: ToolsAssignee: Kyle M Hall <kyle.m.hall>
Status: CLOSED FIXED QA Contact:
Severity: critical    
Priority: P5 - low CC: 1joynelson, chris, koha.sekjal, kyle.m.hall, paul.poulain, tdavis
Version: 3.8   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 8035 - bibs with comments show an error in opac
[SIGNED-OFF] Bug 8035 - bibs with comments show an error in opac
Bug 8035 - bibs with comments show an error in opac

Description Nicole C. Engard 2012-05-01 13:20:05 UTC
This one is a doozy! and it was a hard one to track down - let me know if you need me to clarify these steps. I tested on 3.8 on two servers and it happens on both.

Steps to reproduce:

1. add a comment to a record in the opac
2. approve the comment in the staff client
3. view the record in the opac
4. error appears:

Software error:

Undefined subroutine &main::format_date called at /home/load02/kohaclone/opac/opac-detail.pl line 654.

For help, please send mail to the webmaster (webmaster@Loader), giving this error message and the time and date of the error.


5. go back to comment moderation in the staff client and comment has been deleted (or at least doesn't show on the approved comments or pending comments tab)
6. go back to record in the opac and the bib is now visible without error and there is no comment
Comment 1 Kyle M Hall 2012-05-08 12:23:55 UTC Comment hidden (obsolete)
Comment 2 Nicole C. Engard 2012-05-08 12:35:07 UTC Comment hidden (obsolete)
Comment 3 Elliott Davis 2012-05-09 02:01:27 UTC
This patch looks/works fine.
Comment 4 Elliott Davis 2012-05-09 02:20:52 UTC
I hate to remove a pass but I was talk to chris about this patch earlier and it actually needs to use this:http://wiki.koha-community.org/wiki/Coding_Guidelines#Displaying_dates

This should make the transition easier when we migrate to Koha::Dates giving us a single point of switching.

The line that should actually be corrected is the line calling format_date should be removed and the date should be formatted in the template.
Comment 5 Kyle M Hall 2012-05-09 12:40:50 UTC
Created attachment 9471 [details] [review]
Bug 8035 - bibs with comments show an error in opac

If a record has any approved comments, viewing the record
details in the opac will error out with the following
message:

Undefined subroutine &main::format_date called at
/home/load02/kohaclone/opac/opac-detail.pl line 654.

This is caused by a use of C4::Dates::format_date
without adding a use call to the head of the file.

Removing the call is the only change necessary. The
dates are already being filtered by $KohaDates.
Comment 6 Ian Walls 2012-05-10 16:12:36 UTC
Removes bad subroutine call to no-longer-included module.  Marking Passed QA.
Comment 7 Chris Cormack 2012-05-14 20:37:42 UTC
This will be in 3.8.1

Please don't forget to add your sign off if you sign off, this one only has pauls signoff on it (now mine)
Comment 8 Chris Cormack 2012-05-17 22:11:58 UTC
*** Bug 8114 has been marked as a duplicate of this bug. ***