]> 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)
committerAndrew Fuerste-Henry <andrew@bywatersolutions.com>
Fri, 5 Mar 2021 14:17:03 +0000 (14:17 +0000)
commit1be8ada8a7cf4bbeca81575d1fc0933bc3fe3368
treec45999d2f5f7cb38883946dc4479b790d34db0fe
parent427a7cc555c7337c68a54acdf8684fb1f7993260
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>
Koha/NewsItem.pm
koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-main.tt
t/db_dependent/Koha/News.t