- Issue created by @matteo.borgognoni
- 🇳🇱Netherlands batigolix Utrecht
I found some issues with the patch:
+function cookiebot_gtm_prepare_query() {
This is missing a documentation block.
Also , as it is a helper function, I think it is a convention to rename it to _cookiebot_gtm_prepare_query()
+ // Prepare extra query parameters for the GTM script URL. + $query = '"' . cookiebot_gtm_prepare_query() . '"';
Concatenating a function with some strings looks weird. I'd do something like:
$query = cookiebot_gtm_prepare_query(); $query = '"' . $query . '"';
But maybe there is a more elegant solution for this.
- Status changed to Needs work
over 1 year ago 8:28am 30 June 2023 - 🇬🇧United Kingdom Ashley George
I was finding that the with Matteo's patch the ampersands in the GTM script were being rendered as encoded (&).
I notice that when the html_tag was being rendered, it was being run through a sanitising function before setting that new value as the eventual markup.
In our module, if you set the #value of the html_tag as markup then it bypasses the sanitisation.
I'm not sure if this is the right thing to do but it allowed us to move forward.
- 🇬🇧United Kingdom Ashley George
I realise I accidentally included a change from a seperate patch which altered the script to use 'defer' rather that 'async'. Here's an update without that.
- 🇬🇧United Kingdom Ashley George
I realised I needed to do something similar to the noscript output of this module.
- last update
about 1 year ago Composer require failure -
roaldnel →
committed 5536dec7 on 1.0.x authored by
Ashley George →
Issue #3351065 by Ashley George, matteo.borgognoni, batigolix, roaldnel...
-
roaldnel →
committed 5536dec7 on 1.0.x authored by
Ashley George →
- last update
about 1 year ago Patch Failed to Apply - Status changed to Fixed
about 1 year ago 9:50am 29 September 2023 - 🇳🇱Netherlands roaldnel
I have tested the latest patch and I also applied changes as suggested by batigolix. The code was released in version 1.0.14.
Automatically closed - issue fixed for 2 weeks with no activity.