Commit 78f113b6 authored by Peter Neyens's avatar Peter Neyens Committed by Bram Driesen
Browse files

Issue #3099066 by r81d3r, p-neyens, BramDriesen: Cookiebot Script with auto...

Issue #3099066 by r81d3r, p-neyens, BramDriesen: Cookiebot Script with auto blocking mode not always placed on top of head leading to non-blocked cookies
parent b1c3074f
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -132,8 +132,9 @@ function cookiebot_page_attachments_alter(array &$page) {
    $cookiebot['#attributes']['data-culture'] = $cookiebot_culture;
  }

  // Attach the Cookiebot library.
  $page['#attached']['html_head'][] = [$cookiebot, 'cookiebot'];
  // Attach the Cookiebot library and ensure it's placed first in the list.
  // See: https://www.drupal.org/project/cookiebot/issues/3099066
  array_unshift($page['#attached']['html_head'], [$cookiebot, 'cookiebot']);
  $message_placeholder_cookieconsent_optout_marketing_build = [
    '#theme' => 'cookiebot_blocked_element_placeholder',
    '#content' => [