]> git.koha-community.org Git - koha.git/commit
Bug 24398: Fix 500 when viewing a single news item at the OPAC
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 10 Dec 2020 14:10:10 +0000 (15:10 +0100)
committerVictor Grousset/tuxayo <victor@tuxayo.net>
Fri, 19 Mar 2021 00:00:12 +0000 (01:00 +0100)
commitbb91b7a8a66dc642cbec5a32bf44d7f127973368
treea69bae38ab06ffcb5646a6675532dfb5ebf038f8
parente5fd38db6bb3b10834175ee59dc0d3ef2dc2f470
Bug 24398: Fix 500 when viewing a single news item at the OPAC

Test plan:
0. Set the NewsAuthorDisplay preference to 'OPAC' or 'Both OPAC and staff client.'
1. Open the OPAC main page and click on an individual news item
Without this patch you get an ugly 500
    Template process failed: undef error - The method Koha::NewsItem->author_title is not covered by tests!
With this patch applied you see the news with the author's info

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c596f450d96e04befe6d5335d8ad12679541d220)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 9266846b911f8f69b159ace559a6c119d366336f)

Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com>
(cherry picked from commit 1be8ada8a7cf4bbeca81575d1fc0933bc3fe3368)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Koha/NewsItem.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
t/db_dependent/Koha/News.t