[Bug 32251] New: opac-page.pl: Add a fallback for when language cookie was removed
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Bug ID: 32251 Summary: opac-page.pl: Add a fallback for when language cookie was removed Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Simply put: Replace - my $lang = $query->param('language') || $query->cookie('KohaOpacLanguage'); + my $lang = $query->param('language') || $query->cookie('KohaOpacLanguage') || $template->lang; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|oleonard@myacpl.org |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 144045 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144045&action=edit Bug 32251: Add a fallback for when language cookie was removed Since we remove cookies after logout now, the language cookie might not be there yet. It is friendlier to add the template language fallback here now too before switching to 'default' in the Additional contents (AC)-context. Note: The cookie will not be removed when you added it to the list in koha-conf.xml. Note2: This only pertains to the use of opac-page with code param. Test plan: [1] Create a CMS page with AC. Add two languages (say en, nl-NL). Add different text to default and both languages. [2] Remove the KohaOPACLanguage cookie from your browser (via dev console). [3] Without this patch, copy the Current language URL from the AC overview page. (Note that the Default URL always refers you to 'default'.) [4] Go to that page with the selected (Current..) URL. Observe that you still see the 'default' text. [5] Remove the cookie again if it might be there already. [6] With this patch, observe that you get the language of the interface now on the CMS page using the same URL. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144045|0 |1 is obsolete| | --- Comment #2 from PTFS Europe Sandboxes <sandboxes@ptfs-europe.com> --- Created attachment 144405 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=144405&action=edit Bug 32251: Add a fallback for when language cookie was removed Since we remove cookies after logout now, the language cookie might not be there yet. It is friendlier to add the template language fallback here now too before switching to 'default' in the Additional contents (AC)-context. Note: The cookie will not be removed when you added it to the list in koha-conf.xml. Note2: This only pertains to the use of opac-page with code param. Test plan: [1] Create a CMS page with AC. Add two languages (say en, nl-NL). Add different text to default and both languages. [2] Remove the KohaOPACLanguage cookie from your browser (via dev console). [3] Without this patch, copy the Current language URL from the AC overview page. (Note that the Default URL always refers you to 'default'.) [4] Go to that page with the selected (Current..) URL. Observe that you still see the 'default' text. [5] Remove the cookie again if it might be there already. [6] With this patch, observe that you get the language of the interface now on the CMS page using the same URL. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pascal <pascal.uphaus@gwdg.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Pascal Uphaus <pascal.uphaus@gwdg.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |pascal.uphaus@gwdg.de Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #144405|0 |1 is obsolete| | --- Comment #3 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 145512 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145512&action=edit Bug 32251: Add a fallback for when language cookie was removed Since we remove cookies after logout now, the language cookie might not be there yet. It is friendlier to add the template language fallback here now too before switching to 'default' in the Additional contents (AC)-context. Note: The cookie will not be removed when you added it to the list in koha-conf.xml. Note2: This only pertains to the use of opac-page with code param. Test plan: [1] Create a CMS page with AC. Add two languages (say en, nl-NL). Add different text to default and both languages. [2] Remove the KohaOPACLanguage cookie from your browser (via dev console). [3] Without this patch, copy the Current language URL from the AC overview page. (Note that the Default URL always refers you to 'default'.) [4] Go to that page with the selected (Current..) URL. Observe that you still see the 'default' text. [5] Remove the cookie again if it might be there already. [6] With this patch, observe that you get the language of the interface now on the CMS page using the same URL. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Pascal <pascal.uphaus@gwdg.de> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |kyle@bywatersolutions.com |y.org | CC| |kyle@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.05.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.05. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.05.00 |23.05.00,22.11.03 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32251 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to stable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org