mindshape-GmbH / mindshape_cookie_consent

This extension provides functionality to create a customizable cookie consent for your website. It is developed for flexibility to be customized in accordance to your data security guidelines.
10 stars 13 forks source link

Add script bug #37

Closed gf-luka closed 1 year ago

gf-luka commented 1 year ago

It seems that there is a bug with the integration of scripts.

If you are on a page where the m:consent ViewHelper is included and this should load a script, then this is always loaded as soon as any cookie option is allowed.

For example, on a page GoogleMaps should be loaded by m:consent ViewHelper. If you are on this page and any other cookie is allowed (e.g. "matomo"), the Google script is always loaded as well (see Network-Traffic). Even if you have not allowed this via the Consent buttons.

The error seems to be in the cookie_consent.js in the function replaceConsentButtons. There the data-scripts attributes are collected but at this point no longer checked for the cookieOption.

Best Regards, Gianni

featdd commented 1 year ago

Hi @gf-luka,

thanks for the hint, could you test if this works for you? See: 0a4164efc5412a713ef2f39750b50941023d5ae8

Greetings Daniel

gf-luka commented 1 year ago

Hi Daniel,

thank you for your fast reaction, this seems to work as expected. Perfect.

Thanks for yout work and greetings, Gianni