To recreate: 1. Add some news that should display on opac-readingrecord.pl. For example: opacheader, OpacCustomSearch, opaccredits 2. Go to opac-readingrecord.pl, the news doesn't display Checking the errors logs I see: [WARN] File not found : default/js/locale_data.js at /kohadevbox/koha/Koha/Template/Plugin/Asset.pm line 84
I've been investigating this one today not knowing it had already been reported! It seems to be due to the template for this page not receiving the language (e.g. en-GB) and instead receiving "default".The effect of this is that the call to KohaNews.get in masthead.inc fails. I've not been able to determine why this page in particular is suffering from this issue, I'm hoping someone with more experience of this area can fix it.
I should have said "call to KohaNews.get in any templates/includes that make the call" since this doesn't just affect masthead.inc
It is this line in opac-readingrecord.pl: $template->param(%{$borr}); which is setting the language to 'default'. I'm pretty sure its unnecessary to pass this to the template and we can remove the line.
Created attachment 123230 [details] [review] Bug 28768: remove unnessesary template variable To test: 1. Add some news that should display on opac-readingrecord.pl. For example: opacheader, OpacCustomSearch, opaccredits 2. Go to opac-readingrecord.pl, the news doesn't display 3. Apply patch, restart_all 4. Go to opac-readingrecord.pl, the news displays 5. Turn on 'opacreadinghistory' and test to make sure it still works
Created attachment 123241 [details] [review] Bug 28768: remove unnessesary template variable To test: 1. Add some news that should display on opac-readingrecord.pl. For example: opacheader, OpacCustomSearch, opaccredits 2. Go to opac-readingrecord.pl, the news doesn't display 3. Apply patch, restart_all 4. Go to opac-readingrecord.pl, the news displays 5. Turn on 'opacreadinghistory' and test to make sure it still works Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Created attachment 123311 [details] [review] Bug 28768: remove unnessesary template variable To test: 1. Add some news that should display on opac-readingrecord.pl. For example: opacheader, OpacCustomSearch, opaccredits 2. Go to opac-readingrecord.pl, the news doesn't display 3. Apply patch, restart_all 4. Go to opac-readingrecord.pl, the news displays 5. Turn on 'opacreadinghistory' and test to make sure it still works Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 123312 [details] [review] Bug 28768: (QA follow-up) Remove unused variable Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Suspecting a regression: 239 var borrowernumber = "[% borrowernumber | html %]"; I don't see borrowernumber passed from the pl. That's not an insignificant change, the different include must be checked to make sure none is using one patron's attribute.
Created attachment 127339 [details] [review] Bug 28768: Fix borrowernumber from opac-readingrecord.tt
(In reply to Jonathan Druart from comment #8) > That's not an insignificant change, the different include must be checked to > make sure none is using one patron's attribute. Done, didn't find anything else.
Pushed to master for 21.11, thanks to everybody involved!
Pushed to 21.05.x for 21.05.05
Pushed to 20.11.x for 20.11.12
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.