]> 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)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Sat, 26 Dec 2020 16:58:38 +0000 (17:58 +0100)
commitc596f450d96e04befe6d5335d8ad12679541d220
treef3a868bbb86fdaeeb65f0306a2ba7ca04c9955f0
parent68047132a4888db6eb5169e1cd3ceac49aa84b3b
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>
Koha/NewsItem.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
t/db_dependent/Koha/News.t