Summary: | Wrong variable passed to the template in opac-main | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | OPAC | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | andrew, dcook, fridolin.somers, victor |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.04,20.05.10
|
|
Circulation function: | |||
Bug Depends on: | 14272 | ||
Bug Blocks: | 27634 | ||
Attachments: |
Bug 27650: Fix variable passed to the template in opac-main
Bug 27650: Fix variable passed to the template in opac-main Bug 27650: Fix variable passed to the template in opac-main Bug 27650: Fix variable passed to the template in opac-main Bug 27650: Fix variable passed to the template in opac-main |
Description
Jonathan Druart
2021-02-08 10:25:59 UTC
Created attachment 116490 [details] [review] Bug 27650: Fix variable passed to the template in opac-main From: commit acb455f151ac737613857c58e64a600d760a59e0 Bug 14272: Show single news item [alternative patch] $template->param( + koha_news => @all_koha_news, We must not pass an array, the number of elements of the hash passed to the template may be inconsistent. It's working because of an error earlier in the script: + @all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); GetNewsToDisplay returns an arrayref Test plan: Define at least 2 news to display on the OPAC main page Hit opac-main.pl => All news are displayed Click one => You see the single news you selected Patch doesn't apply: Applying: Bug 27650: Fix variable passed to the template in opac-main fatal: empty ident name (for <>) not allowed Created attachment 116628 [details] [review] Bug 27650: Fix variable passed to the template in opac-main From: commit acb455f151ac737613857c58e64a600d760a59e0 Bug 14272: Show single news item [alternative patch] $template->param( + koha_news => @all_koha_news, We must not pass an array, the number of elements of the hash passed to the template may be inconsistent. It's working because of an error earlier in the script: + @all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); GetNewsToDisplay returns an arrayref Test plan: Define at least 2 news to display on the OPAC main page Hit opac-main.pl => All news are displayed Click one => You see the single news you selected Created attachment 116629 [details] [review] Bug 27650: Fix variable passed to the template in opac-main $template->param( + koha_news => @all_koha_news, We must not pass an array, the number of elements of the hash passed to the template may be inconsistent. It's working because of an error earlier in the script: + @all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); GetNewsToDisplay returns an arrayref Test plan: Define at least 2 news to display on the OPAC main page Hit opac-main.pl => All news are displayed Click one => You see the single news you selected (In reply to Owen Leonard from comment #2) > Patch doesn't apply: > > Applying: Bug 27650: Fix variable passed to the template in opac-main > fatal: empty ident name (for <>) not allowed For the record: it didn't like the 'From: ' in the commit body. The 'Author: ' part of the patch was replaced by this 'From: '. Weird git bug! Created attachment 117858 [details] [review] Bug 27650: Fix variable passed to the template in opac-main $template->param( + koha_news => @all_koha_news, We must not pass an array, the number of elements of the hash passed to the template may be inconsistent. It's working because of an error earlier in the script: + @all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); GetNewsToDisplay returns an arrayref Test plan: Define at least 2 news to display on the OPAC main page Hit opac-main.pl => All news are displayed Click one => You see the single news you selected Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Created attachment 117882 [details] [review] Bug 27650: Fix variable passed to the template in opac-main $template->param( + koha_news => @all_koha_news, We must not pass an array, the number of elements of the hash passed to the template may be inconsistent. It's working because of an error earlier in the script: + @all_koha_news = &GetNewsToDisplay($news_lang,$homebranch); GetNewsToDisplay returns an arrayref Test plan: Define at least 2 news to display on the OPAC main page Hit opac-main.pl => All news are displayed Click one => You see the single news you selected Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 21.05, thanks to everybody involved! Pushed to 20.11.x for 20.11.04 Pushed to 20.05.x for 20.05.10 Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed. |