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
Created attachment 9452 [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. One line fix, adds 'use C4::Dates qw(format_date);' to the head of the file.
Created attachment 9453 [details] [review] [SIGNED-OFF] 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. One line fix, adds 'use C4::Dates qw(format_date);' to the head of the file. Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
This patch looks/works fine.
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.
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.
Removes bad subroutine call to no-longer-included module. Marking Passed QA.
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)
*** Bug 8114 has been marked as a duplicate of this bug. ***