Bug 8035 - bibs with comments show an error in opac
Summary: bibs with comments show an error in opac
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: 3.8
Hardware: All All
: P5 - low critical (vote)
Assignee: Kyle M Hall
QA Contact:
URL:
Keywords:
: 8114 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-05-01 13:20 UTC by Nicole C. Engard
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 8035 - bibs with comments show an error in opac (1.03 KB, patch)
2012-05-08 12:23 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8035 - bibs with comments show an error in opac (1.11 KB, patch)
2012-05-08 12:35 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 8035 - bibs with comments show an error in opac (1.17 KB, patch)
2012-05-09 12:40 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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. ***