Giter Club home page Giter Club logo

laravel-cookie-consent's Issues

How recall modal with a simple link ?

The user has just validated the modal window of the cookies. He made a mistake and would like to return to it. What is the code or the function that allows to do it in blade (href ?)
Thank

Cookies still present after withdrawing consent

I have implemented the package with GTM for my site but I think I might have a problem in the scenario where a user accepts all cookies but then changes their mind using the adjust preferences link.

Reproduction steps:

  1. Load the website and observe the cookie pop up and only essential cookies are set (using Chrome Dev Tools)
  2. Click 'accept all cookies'. Observe the cookie pop up closes and GA cookies are also set
  3. In the footer of the site, click 'adjust your preferences' and untick analytical and marketing cookies. Click 'save my selection'.

Actual behavior:
GA cookies remain and are still set

Expected behavior:
GA cookies are removed and only essential cookies are set

Is this expected or a bug?

I have re-checked that I followed all of the GTM steps as per the documentation:
image

CSS and JS files throw 500 errors

The problem

On page load the CSS and JS files throw a 500 error. The HTML code is visible but display: none; is always active on it. See image below for reference. (the other 500 errors are just images)

Laravel 9, running in docker.

Steps to reproduce:

  1. Installed via composer composer require statikbe/laravel-cookie-consent

  2. Published JS and CSS files as per documentation:
    php artisan vendor:publish --provider="Statikbe\CookieConsent\CookieConsentServiceProvider" --tag="public"

  3. Added stylesheet and js script in base blade.

  4. Added as global middleware:

class Kernel extends HttpKernel
{
    protected $middleware = [
        // ...
        \Statikbe\CookieConsent\CookieConsentMiddleware::class,
    ];

    // ...
}
  1. Cookie button snippet added in footer as per documentation:
    <a href="javascript:void(0)" class="js-lcc-modal-alert">Cookies prefs</a>

  2. Ran php artisan cache:clear and php artisan view:clear

Didn't customize views or translations.

Reference image:

image

Unexpected parenthesis in the Cookie settings pop-up

[Package version: 1.2.1]

In the French version of the Cookie settings pop-up, the first paragraph ends with an unexpected closing parenthesis (see attached image).
This character is not present in the French translation of this sentence.

I can't figure out where this parenthesis comes from.

unexpected_parenthesis

Allow navigation with essential cookies

Hi,

is it possible to allow website navigation with essential cookies and show banner on every page until the user takes a decision?
I have installed the package and banner shows right but all buttons, menu etc.. on the page is disabled.
I have seen "inert" is added to DOM elements but don't know how to disable that and if there's an option.

ignored_paths

I don't want the modal to be shown on certain pages, so I must add the route to ignored_paths array in the config file. For a route as 'admin/users' every thing is fine but for a route as 'admin/user/{id}' it doesn't work. How can I fix it or how can say all the routes which start with '/admin' don't show the cookie policy?

GTM Configuration Issue

Hi, I have followed the steps in GTM configuration provided here (https://github.com/statikbe/laravel-cookie-consent/blob/master/docs/google-tag-manager.md). But I am not sure of two things:

  1. In the screenshot, there is no showing that the GDPR - Consent for marketing cookies trigger should be added but it was mentioned in Step 7. So, which way is correct?
  2. I faced this error when trying to publish the changes -->
    Invalid “Google Analytics Settings” field | Google Analytics | Incompatible variable reference “Event” found in this tag. Please either revert your changes or update the “Google Analytics Settings” field in the tag.

Any help will be appreciated.

Ability to reject all?

In a few GDPR countries you have to provide a button to Reject All in addition to Accept all, I wanted to customize this myself but I'm not sure it's possible without touching the code itself, could this be a possible feature to be added?

Consent mode v2

Is there a way II can use this to comply this with new Consent mode v2 ?

Modal doesn't open - Bootstrap conflict?

I have installed the package as per the docs and added a link in the footer to Manage Cookie Preferences.

Cookie Preferences

The modal will not open. The only way I can get the modal to open is by removing my Bootstrap JS. Therefore I assume there is a conflict between the package JS and Bootstrap JS.

I have Googled the issue and see a lot of articles saying that href="javascript:void(0)" should not really be used.

Any ideas what the Bootstrap conflict may be, or is there an alternative way to open the modal rather than using href="javascript:void(0)"?

Thanks in advance.

Modals don't show up

Environment:

Local website / Laravel 6.18.25 / PHP 7.4 / jQuery 3.1.1

Steps to reproduce:

Package (1.2.0) installed via composer:

composer require statikbe/laravel-cookie-consent

Javascript and css files publication:

php artisan vendor:publish --provider="Statikbe\CookieConsent\CookieConsentServiceProvider" --tag="public"

Added both css/cookie-consent.css & js/cookie-consent.js in the base template file, and web page source code checked for correct files insertion:

    <link rel="stylesheet" type="text/css" href="{{asset('vendor/cookie-consent/css/cookie-consent.css')}}">
    ...
    <script src="{{asset('vendor/cookie-consent/js/cookie-consent.js')}}"></script>

Added Statikbe\CookieConsent\CookieConsentMiddleware to app/Http/Kernel.php:

class Kernel extends HttpKernel
{
    protected $middleware = [
        // ...
        \Statikbe\CookieConsent\CookieConsentMiddleware::class,
    ];

    // ...
}

No translation configured ("Customising the dialog texts" and "Customising the dialog contents" steps from the README not used).

cookie-settings snippet placed in the footer, with a hard-coded label:

<a href="#" class="js-lcc-modal-alert">Cookies preferences</a>

Configuration published:

php artisan vendor:publish --provider="Statikbe\CookieConsent\CookieConsentServiceProvider" --tag="config"

Cache cleared:

php artisan cache:clear
php artisan view:clear

And that's all.

Issue observed:

Going to the homepage of the website, I only see the grey transparent .lcc-backdrop div.
The two other div (lcc-modal--alert & lcc-modal--settings) are not visible (display: none).
Checking the "__cookie_consent" cookie status: not present.

Reproduced on Chrome, Firefox & Edge.

Notes:

  • In fact it did work once: I have seen both modals (on Chrome) the very first time I accessed the website after having installed the package.
  • No Javascript error displayed in the console.
  • No error display in the Laravel debugbar.
  • No parameter changed in cookie-consent.php.
  • Whole process repeated twice with the same result.

No hint path defined for [cookie-consent].

I have installed this. working on my local fine. but getting error 'No hint path defined for [cookie-consent].' on server.
I added this in app/Http/Kerne.php to include it in my entire project: \Statikbe\CookieConsent\CookieConsentMiddleware::class

Can't understand step 3 of "How to configure Google Tag Manager"

I started to follow the "How to configure Google Tag Manager" documentation.
I can't understand which GTM screen the step 3 is related to.

The title "Universal Analytics" that I can see in the screenshot is confusing me.
It is not mentioned in the previous steps.
Where does it come from?

After step 2, when I click the "tag" tab as asked in step 3, I can't see anything looking like in the screenshot.

Also, in the screenshot provided in step 3, I can see that the type of "GDPR - Has not given censent" trigger is "Page View".
But in step 2 we created a "GDPR - Has not given censent" trigger of type "Custom Event".
Did I miss something?

By the way, thank you very much for this documentation which seems great!

Ignored paths

Is posible to ignore an entire path?, something like all pages under policy/......

and it include policy/en, policy/es, policy/de

Unable to remove this package

I removed this package from my project

Now composer cannot more do dump autoload

Generating optimized autoload files
> Illuminate\Foundation\ComposerScripts::postAutoloadDump
> @php artisan package:discover --ansi

   TypeError

  Argument 2 passed to Illuminate\View\Factory::__construct() must be an instance of Illuminate\View\ViewFinderInterface, null given, called in C:\laragon\www\<project name redacted>\vendor\laravel\framework\src\Illuminate\View\ViewServiceProvider.php on line 65

  at C:\laragon\www\<project name redacted>\vendor\laravel\framework\src\Illuminate\View\Factory.php:101
     97▕      * @param  \Illuminate\View\ViewFinderInterface  $finder
     98▕      * @param  \Illuminate\Contracts\Events\Dispatcher  $events
     99▕      * @return void
    100▕      */
  ➜ 101▕     public function __construct(EngineResolver $engines, ViewFinderInterface $finder, Dispatcher $events)
    102▕     {
    103▕         $this->finder = $finder;
    104▕         $this->events = $events;
    105▕         $this->engines = $engines;

  1   C:\laragon\www\<project name redacted>\vendor\laravel\framework\src\Illuminate\View\ViewServiceProvider.php:65
      Illuminate\View\Factory::__construct(Object(Illuminate\View\Engines\EngineResolver), Object(Illuminate\Events\Dispatcher))

  2   C:\laragon\www\<project name redacted>\vendor\laravel\framework\src\Illuminate\View\ViewServiceProvider.php:42
      Illuminate\View\ViewServiceProvider::createFactory(Object(Illuminate\View\Engines\EngineResolver), Object(Illuminate\Events\Dispatcher))
Script @php artisan package:discover --ansi handling the post-autoload-dump event returned with error code 1

What damn is this error?!

I rechecked 123 times, my project doesn't include any reference to provider or what else of this package. I deleted middlewares and removed from appserviceprovider, i removed app/config/ specific file... I removed all views and ensured i do not include these views anymore.

I also did a rm -rf vendor and a composer clear-cache. I manually deleted all caches of laravel app, from storage/framework and from /bootstrap/cache ... I deleted also composer.lock before retry a composer update

What damn is this error?

The absurd is that if I readd the package, the error disappear. What else should I search in my project!?!?

No page refresh after cookie consent given?

[Package version: 1.2.1]

I expected the page to be refreshed after cookie consent, but it's not the behavior I observe in my case.

Is not the page supposed to be refreshed when the user gives consent, to immediately take this setting into account?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.