Bug 37833 - Incorrect logic controlling display of OPAC language selection menus
Summary: Incorrect logic controlling display of OPAC language selection menus
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Jonathan Druart
URL:
Keywords:
Depends on: 35402
Blocks: 36337
  Show dependency treegraph
 
Reported: 2024-09-04 16:01 UTC by Owen Leonard
Modified: 2024-09-13 10:08 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of the OPAC footer and menu options. Some combinations of OPACReportProblem, CookieConsent, OpacLangSelectorMode, and opaclanguagesdisplay system preferences were causing the OPAC footer and menu items not to display as expected (including the footer not displaying, or menu options not displaying).
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37833: Incorrect logic controlling display of OPAC language selection menus (17.94 KB, patch)
2024-09-04 16:11 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37833: Incorrect logic controlling display of OPAC language selection menus (17.94 KB, patch)
2024-09-05 12:00 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37833: Incorrect logic controlling display of OPAC language selection menus (17.99 KB, patch)
2024-09-06 21:54 UTC, David Nind
Details | Diff | Splinter Review
Cookie request - OPAC - covers up the footer so language not selectable (18.06 KB, image/png)
2024-09-06 21:55 UTC, David Nind
Details
Cookie request - staff interface - language selectable (13.75 KB, image/png)
2024-09-06 21:57 UTC, David Nind
Details
Bug 37833: Incorrect logic controlling display of OPAC language selection menus (18.07 KB, patch)
2024-09-12 07:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2024-09-04 16:01:50 UTC
Bug 35402 introduced an error in the logic around how OPAC language menus are displayed. This could cause the footer language menu to not appear or for the whole footer menu to be absent.
Comment 1 Owen Leonard 2024-09-04 16:11:04 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2024-09-05 08:23:31 UTC
The patch needs a rebase, which I have fixed but found a problem.

See bug 36337 comment 6 (maybe the error I found there should actually be fixed here).
Comment 3 Owen Leonard 2024-09-05 12:00:47 UTC
Created attachment 171062 [details] [review]
Bug 37833: Incorrect logic controlling display of OPAC language selection menus

This patch corrects the logic around how the OPAC language menus are
displayed. Because the footer and header lanugage menus have been
combined into one, the logic for whether the menu should appear has to
live outside the include. The patch also makes corrections to ensure
that the footer menu appears even if the footer language menu is hidden.

NOTE: This patch contains whitespace changes, so please view the diff
accordingly.

To test you should have at least one additional language installed.

- Apply the patch and make sure the OPACLanguages system preference has
  more than one language checked.
- Set opaclanguagesdisplay to "Allow."
- In the OPAC, test that the various settings of the
  OpacLangSelectorMode preference work correctly (only top, only footer,
  both top and footer).
- Test with OPACReportProblem on and off, and CookieConsent on and off.
- Test with OPACReportProblem or CookieConsent enabled and
  opaclanguagesdisplay disabled.
Comment 4 David Nind 2024-09-06 21:54:29 UTC
Created attachment 171154 [details] [review]
Bug 37833: Incorrect logic controlling display of OPAC language selection menus

This patch corrects the logic around how the OPAC language menus are
displayed. Because the footer and header lanugage menus have been
combined into one, the logic for whether the menu should appear has to
live outside the include. The patch also makes corrections to ensure
that the footer menu appears even if the footer language menu is hidden.

NOTE: This patch contains whitespace changes, so please view the diff
accordingly.

To test you should have at least one additional language installed.

- Apply the patch and make sure the OPACLanguages system preference has
  more than one language checked.
- Set opaclanguagesdisplay to "Allow."
- In the OPAC, test that the various settings of the
  OpacLangSelectorMode preference work correctly (only top, only footer,
  both top and footer).
- Test with OPACReportProblem on and off, and CookieConsent on and off.
- Test with OPACReportProblem or CookieConsent enabled and
  opaclanguagesdisplay disabled.

Signed-off-by: David Nind <david@davidnind.com>
Comment 5 David Nind 2024-09-06 21:55:19 UTC
Created attachment 171155 [details]
Cookie request - OPAC - covers up the footer so language not selectable
Comment 6 David Nind 2024-09-06 21:57:37 UTC
Created attachment 171156 [details]
Cookie request - staff interface - language selectable

The cookie request covers up the footer in the OPAC, so the language is not selectable.

In the staff interface it doesn't do this, and you can still select the language.

See the screenshots attached.

This was an issue before the patch, so maybe another bug?
Comment 7 Jonathan Druart 2024-09-12 07:28:33 UTC
Created attachment 171355 [details] [review]
Bug 37833: Incorrect logic controlling display of OPAC language selection menus

This patch corrects the logic around how the OPAC language menus are
displayed. Because the footer and header lanugage menus have been
combined into one, the logic for whether the menu should appear has to
live outside the include. The patch also makes corrections to ensure
that the footer menu appears even if the footer language menu is hidden.

NOTE: This patch contains whitespace changes, so please view the diff
accordingly.

To test you should have at least one additional language installed.

- Apply the patch and make sure the OPACLanguages system preference has
  more than one language checked.
- Set opaclanguagesdisplay to "Allow."
- In the OPAC, test that the various settings of the
  OpacLangSelectorMode preference work correctly (only top, only footer,
  both top and footer).
- Test with OPACReportProblem on and off, and CookieConsent on and off.
- Test with OPACReportProblem or CookieConsent enabled and
  opaclanguagesdisplay disabled.

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Katrin Fischer 2024-09-13 10:08:10 UTC
Pushed for 24.11!

Well done everyone, thank you!