Koha-clms/koha-tmpl
Owen Leonard 04314c4fbc
Bug 38948: Modal error on some pages: Can't access property "backdrop"
This patch adds some checks to cookieconsent.js to avoid errors in the
console: If we try to access 'document.getElementById("cookieConsentModal")'
when the element doesn't exist there will be an error:

'Uncaught TypeError: can't access property "backdrop", this._config is
undefined'

The error can be seen in the browser console on the Circulation home
page and the Tools home page when the CookieConsent preference is
enabled.

To test apply the patch and clear your browser cache if necessary.

- Enable the CoookieConsent system preference.
- Go to the Circulation home page. There should be no error in the
  console.
- Clear your browser's local storage to forget your consent.
- Go to the staff client home page. The cookie consent message should
  appear.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
2026-09-24 11:48:44 +00:00
..
intranet-tmpl Bug 38948: Modal error on some pages: Can't access property "backdrop" 2026-09-24 11:48:44 +00:00
opac-tmpl Bug 43237: (follow-up) Adding [% PROCESS 'i18n.inc' %] to two templates which lack it 2026-09-21 16:07:52 +00:00