Bug 40165 - Incomplete logic for controlling display of OPAC language footer
Summary: Incomplete logic for controlling display of OPAC language footer
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: Accessibility (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 39890
  Show dependency treegraph
 
Reported: 2025-06-18 16:54 UTC by Owen Leonard
Modified: 2025-06-20 20:50 UTC (History)
6 users (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 40165: Incomplete logic for controlling display of OPAC language footer (2.14 KB, patch)
2025-06-18 17:41 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 40165: Incomplete logic for controlling display of OPAC language footer (2.19 KB, patch)
2025-06-20 20:50 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2025-06-18 16:54:33 UTC
If you have opaclanguagesdisplay turned on and OpacLangSelectorMode set to "both" or "footer," BUT you only have one language enabled, an empty footer bar might be shown when these prefs are off:

- OPACReportProblem
- CookieConsent
- OpacKohaUrl
Comment 1 Owen Leonard 2025-06-18 17:41:54 UTC
Created attachment 183345 [details] [review]
Bug 40165: Incomplete logic for controlling display of OPAC language footer

This patch adds some additional logic to the template which controls the
appearance of the footer in the OPAC. Some additional checks are
required to make sure an empty footer doesn't display in some
circumstances.

To test, apply the patch and install at least one additional translation
besides English.

Check any OPAC page when various combinations of system preferences are
enabled:

- opaclanguagesdisplay
- OPACLanguages
- OpacLangSelectorMode
- OPACReportProblem
- CookieConsent
- OpacKohaUurl

In particular, confirm that there is not an empty footer when
opaclanguagesdisplay is enabled but there is only one translation
enabled.

Sponsored-by: Athens County Public Libraries
Comment 2 Roman Dolny 2025-06-18 19:36:53 UTC
It works as described for "en". Empty footer is not shown when opaclanguagesdisplay is on, OpacLangSelectorMode both/footer, CookieConsent off, OpacKohaUrl off, OPACLanguages has "en" checked ("pl-PL" not checked).

Changing selection in OPACLanguages spoils performance. When in OPACLanguages "pl-PL" is checked and "en" not checked then empty footer appears.
Comment 3 Owen Leonard 2025-06-20 11:55:47 UTC
Did you update the pl-PL templates after applying the patch? I should have included it in the test plan:

gulp po:update --lang pl-PL
perl misc/translator/translate install pl-PL

Otherwise the changes in the English templates don't get copied over to your translated templates.
Comment 4 Roman Dolny 2025-06-20 20:49:59 UTC
(In reply to Owen Leonard from comment #3)
> Did you update the pl-PL templates after applying the patch? I should have
> included it in the test plan:
> ...

No, I didn't update templates. Thank you for hint. Now it is correct.
Comment 5 Roman Dolny 2025-06-20 20:50:18 UTC
Created attachment 183409 [details] [review]
Bug 40165: Incomplete logic for controlling display of OPAC language footer

This patch adds some additional logic to the template which controls the
appearance of the footer in the OPAC. Some additional checks are
required to make sure an empty footer doesn't display in some
circumstances.

To test, apply the patch and install at least one additional translation
besides English.

Check any OPAC page when various combinations of system preferences are
enabled:

- opaclanguagesdisplay
- OPACLanguages
- OpacLangSelectorMode
- OPACReportProblem
- CookieConsent
- OpacKohaUurl

In particular, confirm that there is not an empty footer when
opaclanguagesdisplay is enabled but there is only one translation
enabled.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>