Disable Javascripts in combination with Opt-in with categories doesn't work

Created on 22 January 2024, 11 months ago

Problem/Motivation

When using Disable Javascripts with entries like:
external:https://www.googletagmanager.com/gtag/js?id=EXAMPLE
These lines are handled in eu_cookie_compliance_js_alter() without the category (here "external:") being stripped off the URL first, resulting in the JS file not being stripped out from the page as the array_key_exists() doesn't find a match against the prepared JS scripts from Drupal.

Steps to reproduce

Configure consent categories and try to use "Disable the following JavaScripts when consent isn't given" as above, then visit a page.

Proposed resolution

Process the JS URL before array_key_exists(). PR to follow...

🐛 Bug report
Status

Closed: duplicate

Version

1.43

Component

Code

Created by

🇬🇧United Kingdom Ben Young

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024