- 🇩🇪Germany kle
I found a bug in eu_cookie_compliance_page_attachments() [Version 8.x-1.24]
In line 295 you prepend a relative path with '/' and compare this with the user-given paths:
if (strpos($src, 'http') !== 0 && strpos($src, '//') !== 0) { $src = '/' . $src; } if (in_array($src, $disabled_javascripts)) { $variables['#attached']['html_head'][$index][0]['#access'] = FALSE; }
But $form['javascripts']['disabled_javascripts']['#description'] says "should be written as root relative paths without the leading slash" - so this never works for relative paths - or am I wrong ?
- Status changed to Postponed: needs info
about 1 year ago 6:15pm 22 October 2023 - 🇳🇴Norway svenryen
@kle,
I'm not sure I follow. From what I recall, $is_script and $is_src refers to two different script types, and won't be present together.
That slash has been prepended since 2020, and is working properly on my installs and apparently for 50000 users of the module. Do you have an example here? Could you make a custom module to demonstrate what you think is wrong, and upload that one to the issue ans a zip package?