This patch works great, but when we use it we found that on every page request where the user has not yet approved or denied the use of cookies, the console was being filled with this error:
Uncaught TypeError: Cannot read properties of undefined (reading 'get')
Which relates to this line in the original JS:
if (Cookiebot.consent[cookieName] === true && cookies.get('cookiebot-consent--' + cookieName) !== '1') {
Seems when the attachBehaviours runs we do not have the derived cookies object from the window.Cookies. Played around with this and if adding this condition to the others seemingly solves the issue, and it doesn't seem to affect the functionality of when the cookies are either approved or denied in our current implementation:
if (typeof Cookiebot === 'undefined' || Cookiebot.consent === void (0) || typeof cookies === 'undefined') {
return;
}
Added the fix as a new patch, but would appreciate it if it could be more broadly tested.
The latest patch works wonderfully. Tested in Drupal 10.2.5, it fixed the issue for me with the SSH library. Beforehand I was too was getting that undefined `connection` property, but this patch resolves that and eliminates the recursive behaviour that would lead to an infinite loop if the exception weren't being thrown.
Currently running Drupal 10.2.4, and when creating a View and adding an OR condition of two taxonomy fields, the resulting JOIN's on these tables remains as an INNER rather than a LEFT:
This is still an issue, but apply the code in the merge request worked very nicely. Can this be rereviewed?
Tested this latest patch on a Drupal 9.5.11 instance running Profile 1.7.0 and it works wonderfully!
SoulReceiver → created an issue.
SoulReceiver → created an issue.