qw3rtty / grav-plugin-simple-cookie

The Simple Cookie Plugin is an extension for Grav. The plugin is based on the popular CookieConsent JS-library. For Advanced Opt-In/Opt-Out configurations you can use the 'Custom configuration' option.
MIT License
8 stars 2 forks source link

"TypeError: this.options.position is undefined" if using the default config #2

Closed MarcelKr closed 4 years ago

MarcelKr commented 4 years ago

If using the default config (enabled: true, custom: false) the error is displayed in the console and the consent popup isn't shown TypeError: this.options.position is undefined - cookieconsent.min.js:1:5345

Only if copying the additional options to the config file the plugin works as expected.

Grav version 1.6.19 Simple Cookie version 0.1.2

qw3rtty commented 4 years ago

Thanks for your report. I will fix it and let you know when i am done.

qw3rtty commented 4 years ago

Hey @MarcelKr, i can't reproduce the error.

I made a complete new Install of Grav CMS and installed the Simple-Cookie plugin. I checked the default config file and everything works fine.

Maybe you have a Plugin installed that creates the error? Can you give me more details?

MarcelKr commented 4 years ago

I'll give it a try in the next few days and report back

qw3rtty commented 4 years ago

@MarcelKr Do you have more details for me? Otherwise i will close this issue. Thx.

MarcelKr commented 4 years ago

Also with a fresh install of grav I get the error TypeError: this.options.position is undefinedcookieconsent.min.js:1:5345. Either by providing no user config file in user/config/plugins or with the plugin's config file copied to user/config/plugins.

The config file only contains the default settings:

enabled: true
custom: false

As soon as I add position: bottom-right to the config, the error changes to TypeError: e is undefinedcookieconsent.min.js:1:1302

As soon as I add palette: gray the errors are gone and the consent windows shows up.

So a minimal working config seems to be:

enabled: true
custom: false
position: bottom-right
palette: gray
qw3rtty commented 4 years ago

@MarcelKr Thanks for your fast reply! I could reproduce the error and i fixed it. The update should be available soon on grav.