OFFLINE-GmbH / oc-gdpr-plugin

October CMS plugin to make websites GDPR and ePrivacy compliant

Home Page:https://octobercms.com/plugin/offline-gdpr

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Banner is displayed only once, html is escaped

zsso opened this issue · comments

commented

Thanks for the plugin. I tried to install it, but I have some issues.

  1. The banner is displayed only, even if I don't click Decline or Accept, jut go to Advanced Settings.
  2. On Advanced Settings page, html is escaped. I tried with October CMS Demo theme. Please have a look at screenshot.
    html_escaped

The banner is displayed only, even if I don't click Decline or Accept, jut go to Advanced Settings.

Did you include jQuery and October's JS Framework?
https://octobercms.com/docs/ajax/introduction#framework-script

On Advanced Settings page, html is escaped. I tried with October CMS Demo theme. Please have a look at screenshot.

Did you override any partials? Content like the contact details are passed through the | raw filter and should therefore not be escaped:

https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/blob/develop/components/cookiemanager/details.htm#L37

commented

The banner is displayed only, even if I don't click Decline or Accept, jut go to Advanced Settings.

Did you include jQuery and October's JS Framework?
https://octobercms.com/docs/ajax/introduction#framework-script

Yes, it is included, ajax is working.

On Advanced Settings page, html is escaped. I tried with October CMS Demo theme. Please have a look at screenshot.

Did you override any partials? Content like the contact details are passed through the | raw filter and should therefore not be escaped:

https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/blob/develop/components/cookiemanager/details.htm#L37

I did not override anything.
I just tried, that if I change: {{ html_clean(cookie.contact_details_dpo | raw) }} to {{ cookie.contact_details_dpo | raw }} it works as expected.

Similar issue. The html is not rendering correct. I have not touched the partial. no over-rides. see https://prnt.sc/1wtk6zj

same solution works for me I just tried, that if I change: {{ html_clean(cookie.contact_details_dpo | raw) }} to {{ cookie.contact_details_dpo | raw }}

Same issue with html not rendering correct. Html is escaped. Also, banner is displayed only once. It seems to conflict with some JS.

VM54:1 Uncaught SyntaxError: Unexpected token ':'

commented

Regarding the "Banner is displayed only once" issue, it only happens if I open Advanced options page. Cookie gdpr_cookie_consent is added when that page is opened, without accepting anything. Can you give me a hint how to turn it off?

This is by design. The banner component only allows cookies if the user explicitly clicks "accept". If "go to settings" is selected, the user had the chance to choose the accepted cookies. If nothing is explicitly selected, the banner should not be displayed over and over again.

To disable this behaviour, remove these two lines and do the redirect to the settings page using a simple a tag:
https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/blob/develop/components/cookiebanner/settings.htm#L4-L5

commented

This is by design. The banner component only allows cookies if the user explicitly clicks "accept". If "go to settings" is selected, the user had the chance to choose the accepted cookies. If nothing is explicitly selected, the banner should not be displayed over and over again.

To disable this behaviour, remove these two lines and do the redirect to the settings page using a simple a tag: https://github.com/OFFLINE-GmbH/oc-gdpr-plugin/blob/develop/components/cookiebanner/settings.htm#L4-L5

Thank you for the fast answer!