option page_reload leads to constant reloads with enabled AdBlocker (Gostery) when advagg preprocessing for JS is enabled

Created on 22 March 2023, over 1 year ago
Updated 23 October 2023, about 1 year ago

Problem/Motivation

on a page with enabled js-preprocessing in advagg we also have eu_cookie_compliance enabled. because we definitely want to track the first request we enabled the option to reload the page after the user clicks the agree button. if a user with an AdBlocker requests a page and if the user set the AdBlocker to "never consent" this results in constant reloading of the page.

Steps to reproduce

  • enable eu_cookie_compliance with option "Reload page after user clicks the "Agree" button."
  • enable advagg with preprocessing on JS enabled
  • enable e.g. ghostery browserplugin in chrome and set option to never consent for this website

Proposed resolution

the reloading is caused in Drupal.eu_cookie_compliance.changeStatus which is called in Drupal.eu_cookie_compliance.savePreferencesAction which in turn is called in Drupal.eu_cookie_compliance.attachSavePreferencesEvents. And that's where in my opinion the problem lies. I assume, that the AdBlocker is executing a click on the save prefernces button, but after the reload the second click would no longer be necessary. The click event should only be triggered under certain circumstances (e.g. checking the current cookies or checking if the popup is open or closed).

🐛 Bug report
Status

Closed: cannot reproduce

Version

1.24

Component

Code

Created by

🇦🇹Austria crmn

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

Comments & Activities

  • Issue created by @crmn
  • @crmn opened merge request.
  • Status changed to Needs review about 1 year ago
  • Status changed to Postponed: needs info about 1 year ago
  • 🇳🇴Norway svenryen

    Hi again, @crmn.

    I did some minimal attempt at reproducing, but given that there was no product named "AdBlocker" for Chrome (that I could find), I'm a bit short on this one.

    I did try to install AdBlock (the Chrome plugin) but I din't want to pay a premium to get the cookie consent automation. I also found AdBlocker Ultimate, but that plugin didn't have any feature that I could see to work with cookie banners.

    So I'm a bit lost. I'd be happy to provide a better experience if you could name the product you're having issues with and provide a clear list of steps to reproduce.

    I see your proposed solution, but I'd like the patch to be testable. I might take a look again later, but for now I'll mark this issue as "Postponed"

  • Status changed to Closed: cannot reproduce about 1 year ago
  • 🇦🇹Austria crmn

    the AdBlocker i've used was "Ghostery" (see description), but in the meantime there have been module updates and I can no longer reproduce the error. I assume that the error only appeared in an older version of the module. or even through a patch applied to an older version of the module.

Production build 0.71.5 2024