Cookiehint und kein Ende - jetzt 3.3.0

  • Joomla Version
    5 und 6
    PHP Version
    PHP 8.4.x
    Hoster
    egal

    Das dritte Update in einer Woche.

    Keine Angabe ob es sicherheitskritisch ist oder was auch immer.

    So kann man auch entwickeln, indem man User als Testkunden nutzt.

    Sorry aber es nervt.

  • Im Plugin selbst gibt's einen Changelog:


    Denke, nur "schöner wohnen"....


  • Also die neue Version kann ich überhaupt nicht nutzen, da sie nur stupide am Ende der Seite rangepappt wird. Ich müsste einen entsprechenden Override erstellen, damit der Banner auch wirklich "Sticky" ist.

    Das nervt und ich will das nicht bei über 80 Seiten machen.

    Die alte Version funktioniert nach wie vor noch - sobald man auf die neue geht dann naja.

  • Also die neue Version kann ich überhaupt nicht nutzen, da sie nur stupide am Ende der Seite rangepappt wird. Ich müsste einen entsprechenden Override erstellen, damit der Banner auch wirklich "Sticky" ist.

    Das nervt und ich will das nicht bei über 80 Seiten machen.

    Die alte Version funktioniert nach wie vor noch - sobald man auf die neue geht dann naja.

    Wieso nicht einfach unten in den Fuss ein Link zum öffnen des Banners?

    Sticky nervt doch nur und beeinträchtigt kleine Displaygrößen. Ja, der Link ist möglich mit dem entsprechenden Aufruf:

    Code
    color: inherit;" data-cc="c-settings"><a href="/?rCH=0" title="Cookie Einstellungen öffnen">Cookie-Set</a></button></div>
  • Wieso nicht einfach unten in den Fuss ein Link zum öffnen des Banners?

    Sticky nervt doch nur und beeinträchtigt kleine Displaygrößen. Ja, der Link ist möglich mit dem entsprechenden Aufruf:

    Code
    color: inherit;" data-cc="c-settings"><a href="/?rCH=0" title="Cookie Einstellungen öffnen">Cookie-Set</a></button></div>

    Sorry falscher Code. Hatte den von einem anderen Cookiebanner verwendet. Richtig muss es so lauten für den Link:

    /?cookiehint=set

    Das steht aber auch im Plugin beschrieben. Sorry für den falschen Code. Der war für n3tcookieconsent.

  • Alles funktioniert, nur nicht im Browser mit uBlock Spambot Plugin.

    Und gensu dazu hat mir ein dienstbarer Geist ein Plugin geschrieben.

    Dieses Plugin ist updatesicher und verändert die Namen der JS Skripte, sodass uBlock nicht mehr meckern kann.

    Diese Beschreibung gehört dazu:


    Fixing Astroid Cookie Consent Blocking by uBlock Origin

    Problem

    The Astroid Framework includes its own Cookie Consent functionality. On some privacy-oriented browsers, the Cookie Consent button may appear but does not work.

    The problem can be caused by uBlock Origin, specifically the EasyList – Cookie Notices / Fanboy's Cookiemonster filter list.

    For example, uBlock Origin may block the Astroid JavaScript file:

    Code
    /media/astroid/js/cookieconsent.min.js

    The uBlock Origin logger reports a filter similar to:

    Code
    /cookieconsent.min.$~stylesheet

    from:

    Code
    EasyList – Cookie Notices

    The important point is that the script itself is valid and accessible. It is blocked because its filename contains cookieconsent, which is recognized as a cookie-notice script by the filter list.

    This can result in the following browser console message:

    Code
    Loading failed for the <script> with source
    "https://example.com/media/astroid/js/cookieconsent.min.js"

    The problem may not occur in all browsers. For example, the same Joomla website can work normally in Firefox or Chromium while the Cookie Consent button is broken in a browser using uBlock Origin with the affected filter list.


    Solution

    Instead of modifying the Astroid Framework files, a small Joomla System Plugin can provide the same JavaScript through a neutral URL.

    This has two important advantages:

    1. Astroid itself is not modified.
    2. The solution survives future Astroid updates.

    The plugin uses the existing Astroid Cookie Consent JavaScript rather than maintaining a modified copy of it.

    The original file remains:

    Code
    /media/astroid/js/cookieconsent.min.js

    The plugin additionally makes the same file available through a neutral Joomla URL, for example:

    Code
    /index.php?cookieconsentfix=1

    Thus the browser receives the same Cookie Consent JavaScript, but uBlock Origin no longer sees the filename cookieconsent.min.js in the requested resource.


    Why not modify Astroid?

    A direct modification of:

    Code
    /media/astroid/js/cookieconsent.min.js

    or of the Astroid source code would work around the problem, but it is not a good long-term solution.

    An Astroid update could overwrite the modification.

    A separate Joomla System Plugin keeps the workaround independent from the template/framework and therefore makes it update-safe.


    Plugin behaviour

    The plugin performs the following tasks:

    1. Detects the request for the alternative Cookie Consent URL.
    2. Locates the currently installed Astroid Cookie Consent JavaScript.
    3. Reads the current file.
    4. Returns it with the appropriate JavaScript content type.
    5. Leaves the original Astroid file untouched.

    Consequently, when Astroid updates its Cookie Consent implementation, the plugin continues to use the currently installed Astroid file.

    No duplicate JavaScript implementation needs to be maintained.


    Installation

    Install the plugin through the Joomla administrator:

    System → Install → Extensions

    Upload the plugin ZIP package and install it.

    Then go to:

    System → Plugins

    Find:

    System – Cookie Consent Fix

    and enable it.

    After enabling the plugin, clear the Joomla/browser cache if necessary and reload the website.


    Testing

    The problem should be tested with uBlock Origin enabled.

    Open the website with:

    • Firefox + uBlock Origin
    • Chromium/Chrome + uBlock Origin
    • Brave + uBlock Origin
    • Mullvad Browser + uBlock Origin
    • other privacy-oriented browsers using EasyList/Fanboy cookie filters

    Open the browser developer tools and check the Network tab.

    The Cookie Consent JavaScript should now be loaded through the neutral Joomla URL instead of being blocked because of the cookieconsent.min.js filename.

    The Cookie Consent button should then operate normally.


    Verifying the cause with uBlock Origin

    The uBlock Origin Logger is useful for diagnosing this problem.

    With uBlock Origin enabled, open:

    uBlock Origin → Logger

    Reload the website and look for:

    Code
    cookieconsent.min.js

    A blocked request may look similar to:

    Code
    Filter: /cookieconsent.min.$~stylesheet
    Filter list: EasyList – Cookie Notices
    Type: script

    This confirms that the request is being blocked by the cookie-notice filter rather than by Joomla, Astroid, the web server, or a missing JavaScript file.


    Important distinction

    This workaround does not disable uBlock Origin and does not require visitors to create an exception for the website.

    It only changes the way the existing Astroid JavaScript is delivered.

    The Cookie Consent functionality itself remains the Astroid implementation.

    The purpose of the plugin is therefore not to bypass privacy protection in general, but to prevent a legitimate, first-party Cookie Consent script from being incorrectly classified and blocked solely because of its filename.


    Result

    After installing the plugin, the same Astroid-based website can provide a working Cookie Consent dialog even when uBlock Origin's cookie-notice filters are enabled.

    The Astroid Framework remains unmodified, making the solution suitable for websites that receive regular Astroid updates.

    Environment

    Example environment in which the problem was identified:

    • Joomla 6
    • Astroid Framework 3
    • Astroid Cookie Consent
    • uBlock Origin
    • EasyList – Cookie Notices / Fanboy's Cookiemonster
    • Firefox / Chromium / Brave / Mullvad Browser

    The exact browser behaviour depends on the installed uBlock Origin filter lists and their current versions.

  • franke12359 Keine Ahnung was da nicht funktionieren soll.

    Wir haben viele Seiten in dieser Kombi und es gibt keine Probleme.

    Wäre deine Fehlerbeschreibung genauer als ein Satz, könnte man es vielleicht nachvollziehen:

    Zitat

    Alles funktioniert, nur nicht im Browser mit uBlock Spambot Plugin.

  • uBlock verhindert das Laden von /media/astroid/js/cookieconsent.min.js

    Damit wird verhindert das der OK Knopf wirksam wird und der nervige Hinweis bleibt dauerhaft.

    das Plugin benennt für den Browser diese Datei um, sodass uBlock nicht mehr blockiert.

    In der englischen Beschreibung darunter wurde alles genau erklärt.

    Ohne uBlock funktioniert es auch so, jedoch wissen viele Nutzer nicht das sie diesen Werbeblocker benutzen und für diese ist die Seite dan kaputt.

    Web- Programmierer seit 20 Jahren für viele Systeme.

  • Ach ihr meint den kleinen Button den es vorher nicht gab?

    Ich habe nun bei einer meiner Webseiten (alles Cassiopeia) das Problem auch:

    Astronomie Oberpfalz – Herzlich Willkommen ....
    Homepage der neuen Astronomie-Plattform für die Oberpfalz! Sternwarte. Volkssternwarte. Beobachtung. Amateurastronomie. Sterne. Planeten.
    www.astronomie-oberpfalz.de

    Auf dem Smartphone (Android) wird der Cookie-Dialog unten irgendwo angezeigt.

    (Simulieren mit dem Browser klappt nicht)