Use $service->get('consentRequired') not $service->get('consent')

Created on 28 June 2023, over 1 year ago
Updated 31 May 2024, 6 months ago

I'm just testing this module and have spotted what I think is a bug in how the module determines whether consent is required:

The following line in cookies_gtag_consent_page_attachments() always returns null because the service container doesn't have a "consent" value, but it does have consentRequired:

// Not working:
$consent_required = $service->get('consent');

// Working:
$consent_required = $service->get('consentRequired')

Apologies for not providing a patch but will endeavour to do so son if no-one else has a chance to do so.

/Al

πŸ› Bug report
Status

Fixed

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