]> 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)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 28 Dec 2020 15:02:25 +0000 (16:02 +0100)
commit9266846b911f8f69b159ace559a6c119d366336f
tree002bcf2b0f588218247937c76aedc58b83f7e58a
parentf0b4ebc2bf74c408102c19bb7c2a85279762f691
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>
Koha/NewsItem.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
t/db_dependent/Koha/News.t