dmstr / yii2-cookie-consent

14 stars 3 forks source link

CookieConsent is not defined #6

Closed ChrisWeit closed 3 years ago

ChrisWeit commented 3 years ago

I've been getting some errors lately:

Uncaught SyntaxError: Unexpected token 'export'
Uncaught ReferenceError: CookieConsent is not defined

The error points to this part of the code:

<script>window.addEventListener('load', function () {
    window.cookieConsent = new CookieConsent({

I tested it with the copy & paste example from the README and still got it.

I can't remember when the problem came up.


current cookie consent version: 1.4.4 PHP: 7.3.12

eluhr commented 3 years ago

@ChrisWeit Which Browser are you using?

ChrisWeit commented 3 years ago

It was happening independently from the browser, but I somehow fixed it. (Tried chrome, firefox and so on) Sorry for taking your time. I don't know what did it in the end. I just tried an older version and updated some things, and finally switched back to 1.4.4 and suddenly it worked again.

Thanks for taking the time.