Release 1.2.5 adds explicit dependency on google_analytics, causes WSOD on sites with cookies_ga enabled without google_analytics

Created on 29 September 2023, about 1 year ago
Updated 6 October 2023, about 1 year ago

Problem/Motivation

Issue 1.2.5 has added an explicit dependency on the Google Analytics module when it previously didn't:

https://git.drupalcode.org/project/cookies/-/merge_requests/98/diffs#38a...

As a result, in cases where cookies_ga is enabled and google_analytics isn't present/enabled, the site suffers a WSOD.

Steps to reproduce

Install cookies_ga 1.2.4 on a site without google_analytics - the site will load.

Upgrade to 1.2.5. The site no longer loads and an error like the following is logged in Watchdog:

Message	Drupal\Core\Extension\Exception\UnknownExtensionException: The module google_analytics does not exist. in Drupal\Core\Extension\ExtensionList->getPathname() (line 522 of /app/web/core/lib/Drupal/Core/Extension/ExtensionList.php).

Proposed resolution

Remove the explicit dependency on google_analytics and instead use the module handler to check for its existence at runtime.

/Al

🐛 Bug report
Status

Fixed

Version

1.2

Component

Code

Created by

🇬🇧United Kingdom alexharries

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

Comments & Activities

Production build 0.71.5 2024