Giter Site home page Giter Site logo

offline-gmbh / oc-gdpr-plugin Goto Github PK

View Code? Open in Web Editor NEW
36.0 8.0 19.0 847 KB

October CMS plugin to make websites GDPR and ePrivacy compliant

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

License: MIT License

PHP 32.80% JavaScript 0.41% HTML 63.44% CSS 3.36%
octobercms octobercms-plugin gdpr eprivacy

oc-gdpr-plugin's Introduction

oc-gdpr-plugin

October CMS plugin to make websites GDPR compliant.

This plugin is available on the October Marketplace: https://octobercms.com/plugin/offline-gdpr

Features

Cookie Consent Manager

This plugin provides two simple components to make your October installation GDPR compliant.

cookie-manager

Quick start

  1. Define your cookie groups and cookies via the backend settings page. You can also import a example preset by running php artisan gdpr:import
  2. Place the cookieManager component on a cookies.htm page
  3. Place the cookieBanner component on all of your layouts. Use the configuration listed below.
[cookieBanner]
include_css = 1
update_partial = "gdpr"
update_selector = "#gdpr-reload"
cookie_manager_page = "cookies"
==
{% component 'cookieBanner' %}
  1. Create a new gdpr.htm partial. Include the partial in your layouts as shown below. Note the #gdpr-reload wrapper.
<div id="gdpr-reload">
    {% partial 'gdpr' %}
</div>
  1. Inside your gdpr.htm partial you can now conditionally include your dependencies by querying the cookie's code.
{% if gdprCookieAllowed('google-analytics') %}
    <!-- Include analytics code here -->
{% endif %}

Cookie manager

The cookieManager component gives a visitor more control over the cookies your site is using.

This component can simply be placed on a page and needs no further configuration.

title = "Cookies"
url = "/cookies"
layout = "default"
is_hidden = 0

[cookieManager]
==
{% component 'cookieManager' %}

Cookie presets

It is possible to define your cookie groups and cookies in a yaml file and import them using the gdpr:import console command. This allows you to define cookies once and re-use them between installations.

php artisan gdpr:import --path=plugins/offline/gdpr/assets/presets/example_en.yaml --replace

You can find example definitions in the assets/presets directory of this plugin.

You can optionally use the --replace flag to remove all existing cookie data and replace it with your preset.

If no path is specified, the plugin will load all presets from the configured presets_path and ask you which preset to import.

You can change the path where presets are loaded from by changing the offline.gdpr::config.presets_path config entry. To do this, create the file config/offline/gdpr/config.php and return your custom path:

<?php
return [
    'presets_path' => '/path/to/your/presets',
];

cookieBanner

image

The cookieBanner component displays a cookie banner on the first page view. There the user has the possibility to enable and disable cookies that your website uses (defined via October's backend settings).

These settings are stored and made available in your partials using the gdprCookieAllowed helper. With this helper you can check for the user's consent and optionally include your resources.

Installation

  1. Define your cookie groups and cookies via the Backend settings
  2. Add the cookieBanner component to all your layouts.
[cookieBanner]
include_css = 1
update_partial = "gdpr"
update_selector = "#gdpr-reload"
cookie_manager_page = "cookies"
==
{% component 'cookieBanner' %}

Log

You can enable a log via the backend settings so every cookie banner request gets logged. This is useful to get an idea of the number of users that do not accept a cookie request and therefore never end up in your analytics data.

The log only contains the user's session id and their decision.

Properties

If you don't want to include the default css use include_css = 0 when including your component.

cookieManager page

Set the property cookie_manager_page to the page that contains the cookieManager component.

A Advanced Settings link will be placed on the cookieBar that links to this page. This enables the user to further define what cookies are allowed.

Twig Helpers

gdprCookieAllowed($code, $minLevel = 0)

Check if a certain cookie is allowed to be included. You can optionally pass a cookie level to check if the user has accepted a specific level of this cookie.

{% if gdprCookieAllowed('google-analytics') %}
    <!-- Include Analytics Code here -->
{% endif %}

{% if gdprCookieAllowed('google-analytics', 3) %}
    <!-- Include advanced Level 3 Analytics Code here -->
{% endif %}
gdprAllowedCookieLevel($code)

Get the max allowed level for a certain cookie. A return value of -1 means the cookie is not allowed at all. A value of 0 or higher means the cookie is allowed with the returned level value.

{% if gdprAllowedCookieLevel('google-analytics') >= 3 %}
    <!-- Include advanced Level 3 Analytics Code here -->
{% endif %}
gdprIsUndecided()

Check if the user has made a decision about the cookies yet. This will return true on the second page view if the user did not interact with the cookieBanner (silent opt-in).

Data retention

The data retention functionality enables you to delete old plugin data after a specified amount of days.

You can specify the data retention policy for each plugin via October's backend settings.

Important: To automatically delete old data make sure you have set up the Task Scheduler correctly.

Register your plugin

To register your plugin you have to listen for the offline.gdpr::cleanup.register event in your Plugin's boot method.

    public function boot()
    {
        \Event::listen('offline.gdpr::cleanup.register', function () {
            return [
                'id'     => 'your-contact-form-plugin',
                'label'  => 'Custom Contact Form Plugin',
                'models' => [
                    [
                        'label'   => 'Contact form messages',
                        'comment' => 'Delete logged contact form messages',
                        'class'   => MessageLog::class,
                    ],
                    [
                        'id'      => 'vendor-plugin-spam-messages',  // The ID is required if you specify a closure. This should be unique to your plugin.
                        'label'   => 'SPAM-Messages',
                        'comment' => 'Delete blocked SPAM messages',
                        'closure' => function (Carbon $deadline, int $keepDays) {
                            // Delete your old data here
                        },
                    ],
                ],
            ];
        });
    }

You have to specify the following data:

key information
id A unique identifier of your plugin
label A human readable label for your plugin
models An array of all your data collecting models

As models you have to specify an array with the following data:

key information
id A unique string to identify this model. Use only _-a-z0-9. Only required if you specify a closure. (ex. offline-gdpr-spam-messages)
label A human readable label for the backend switch form widget
comment A human readable comment for the backend switch form widget
closure A closure that is called when the cleanup job is run. Make sure to also define an id.
class A model class that defines a gdprCleanup method

You have to specify either a closure or a class value. If both are specified the closure value will be used.

Cleanup method

You can either specify a closure or a model class that defines a gdprCleanup method. Both have the same signature:

    public function gdprCleanup(\Carbon\Carbon $deadline, int $keepDays)
    {
        self::where('created_at', '<', $deadline)->each(function (self $item) {
            $item->delete();
        });
        // or
        // self::where('created_at', '<', $deadline)->delete();
    }

This method is called whenever the cleanup job is run. $deadline contains a Carbon instance. All data older than this date has to be deleted. $keepDays contains the number of days that $deadline is in the past.

Make sure to use an each/delete loop if your model makes use of deleting/deleted model events.

Cleanup command

You can trigger the cleanup on demand via

php artisan gdpr:cleanup

oc-gdpr-plugin's People

Contributors

alxy avatar angelcoding avatar cptmeatball avatar damsfx avatar magiczne avatar mediaclinic avatar patrick-durrer avatar shrikefin avatar tobias-kuendig avatar tospe avatar vosco88 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

oc-gdpr-plugin's Issues

Language

Hello!

My website only uses German as language. Although backend settings are selected to preferred language german, the cookie banner stays english.

If I install Rainlab.Translate and use the language prefix de then it works. But what if I don't wanna use Rainlab.Translate?

How can I change the language of the cookie banner to german, if I don't use Rainlab.Translate?

Thank you in advance!

Can not upload the latest Pull Request

Hi,

Could you process them please I got a back log now of 61 file updates and 4408 Code Corrections!!!

See Screenshot:

untitled

Please don't do any code changes until you have processed the Pull Requests.

All the updated code is fine my end....? (Done some Major Updates!)

Undefined index message

Thank you for the plugin. It really saved me a lot of time.
However I find a bug...or possibly I just missed something in documentation.

When I do not enable a cookie with cookie manager than I receive an error:

An exception has been thrown during the rendering of a template ("Undefined index: oracles-addthis").

This is in my gdpr partial:

{% if gdprCookieAllowed('oracles-addthis') %}
	...my content...
{% endif %}

Of course I've created cookie called oracles-addthis.
Is it a bug or am I doing something wrong?

Thank you!
CB

Error installing with artisan command

> php artisan plugin:install Offline.gdpr
Downloading plugin: OFFLINE.GDPR
Unpacking plugin: OFFLINE.GDPR
Migrating plugin...
OFFLINE.GDPR

In Yaml.php line 45:

  A syntax error was detected in /var/www/acme/plugins/offline/gdpr/updates/version.yaml. Unable to parse at line 41 (near " fields to optimize ePrivacy conformity. (*Very big thank you* to
   ayumihamsaki for giving a lot of feedback via our") at line 45 (near "/var/www/acme/vendor/october/rain/src/Parse/Yaml.php").

Can anyone confirm this issue on a fresh install?

Mass assignment

It would be fine if we could add default settings for groups and cookies, ,via mass assignment in tools like oc-bootstrapper or seeder files.

I only repeat, or almost repeat, the same parameters at each site. :-/

enabling/disabling checkboxes in cookiebanner doesn't do anything

What should happen

  • Checking a cookiegroup on the cookiebanner enables all cookies in that specific group.
  • Unchecking a cookiegroup on the cookiebanner disables all cookies in that specific group.

What actually happens

  • Checking or unchecking a cookiegroup on the cookiebanner does not enable or disable cookies in a group.

Restructuring of backend fields

Cookie Groups

List

Form

  • Description Field (6fbe344)

  • Rename to Purpose

  • Comment: Describe the Purpose of the Use, Processing and any Notifications e.g. Determines if the user's navigation should be registered in a certain statistical placeholder

  • Make required

  • Make larger

Cookie

Form

  • New field Name (Cookie Identification) (2713800)

  • Comment: The Name of the of the Cookie Prefix code e.g. _ga, ASP.NET_SessionId

  • Required: No (Not everything will use a cookie code - like social sharing buttons)

  • Field Type: Taglist

  • New field Provider (2713800)

  • Comment: Under ePrivacy Law, you need to state the website domain name e.g. google.com

  • Required: Yes (has to be displayed by law)

  • Field Type = String

  • Rename Cookie Levels to Manage Levels (202177a)

  • Rename description field to purpose (6fbe344)

  • Make Purpose field required (6fbe344)

  • Add field Duration/Expiry (2713800)

  • Comment: Under ePrivacy Law, you need to state how long it will be used in the user browser e.g. Session, 3 months, 2 years.

  • Required: Yes (has to be displayed by law)

  • Field Type: String

  • Add field Type (2713800)

  • Comment: Under ePrivacy Law, you need to state what type of cookie or module this is e.g. HTTP Cookie, Pixel Tracker, Twitter Widget

  • Required: Yes (has to be displayed by law)

  • Field Type: String or Drop-Down Selector

  • Add field Contact Details of Data Controller (1922c55)

  • Comment: Under ePrivacy Law, you have to give the DPO Contact Address of the cookie e.g. Cloudflare, Inc. 101 Townsend St. San Francisco, CA 94107. Attention: Data Protection Officer, [email protected]

  • Required: Yes (has to be displayed by law)

  • Field Type: TextArea

  • Add field Contact DPO (1922c55)

  • Comment: Under ePrivacy Law, you need to give a link directly to the webpage of the DPO of the cookie e.g. Link to their Terms, Privacy, Cookie Privacy page etc.

  • Required: Yes (has to be displayed by law)

  • Field Type: String or repeater field (link & anchor)

  • Move Group Description field from own tab to base form layout (013ea5b)

via #8

"Undefined index: class" on line 36 of /plugins/offline/gdpr/models/DataRetentionSettings.php

Hello,

I'm trying to integrate an external plugin with the data-retention system.

The documentation says :

You can either specify a closure or a model class that defines a gdprCleanup method. Both have the same signature:

Here is my code :

        public function boot() {
        \Event::listen('offline.gdpr::cleanup.register', function () {
            return [
                'id'     => 'magicforms',
                'label'  => 'Magic Forms',
                'models' => [
                    [
                        'label'   => 'Magic Forms Records',
                        'comment' => 'Delete logged Magic Forms Records',
                        'closure' => function (Carbon $deadline, int $keepDays) {
                            // Delete your old data here
                        },
                    ],
                ],
            ];
        });
    }

But when I go to the GPRD data retention page, I get the following error :

"Undefined index: class" on line 36 of /plugins/offline/gdpr/models/DataRetentionSettings.php

Feedback for your Plugin

Hi,

Firstly, congratulations on your plugin so far! I hope you don't mind if I give you a very long list of feedback suggestions, some are idea suggestions and others are very important. I will try and label each thing as such and try to give you as much information as possible.

Backend

Going to start with the backend as the very important ones are here when I create fields in October in the Backend, I have the "label" on the top and a "comment" on the bottom explaining the field, also I will say required or not.

List View

  1. "Name" did some checking and the correct Label would be "Owner". Maybe change it to "Name/Owner"?

  2. "Group Name" that is fine and perfect.

Item View

  1. "Description" field, technically this is not a description from reading the law so I would recommend changing the label and adding a comment.

Label = Purpose
Comment = Describe the Purpose of the Use, Processing and any Notifications e.g. Determines if the user's navigation should be registered in a certain statistical placeholder.
Required = Yes (has to be displayed by law)
Field Type = TextArea
(I also think maybe make the textarea size - large. As we gonna write at least 3-4 sentences for each and maybe list the cookie codes as well)

  • I have seen a website with a list of these descriptions for the most common things, so I don't know if it would be useful to make a list for you and then users could select from a list and write custom ones.
  1. "Name (Cookie Identification)", please add this field. It is the cookie name code, there could be several of them.

Label = Name (Cookie Identification)
Comment = The Name of the of the Cookie Prefix code e.g. _ga, ASP.NET_SessionId
Required = No (Not everything will use a cookie code - like social sharing buttons)
Field Type = TextArea
(I think use a Text Area because we may need to list several, Google Anayltics uses 8 different ones):
__utma
__utmz
_gat
_gid
_ga
__utmb
__utmc
__utmv

  1. "Provider", please add this field. The Provider will be the website domain name.

Label = Provider
Comment = Under ePrivacy Law, you need to state the website domain name e.g. google.com
Required = Yes (has to be displayed by law)
Field Type = String

  1. "Cookie Levels", looks great, wonderful idea and concept, again change the description and add the comment and required. I think remove the word Cookies as this plugin can manage everything! Maybe Change the Label to "Manage Levels".

  2. "Duration/Expiry" please add this field, by law you need to state how long the cookie will be used for?

Label = Duration/Expiry
Comment = Under ePrivacy Law, you need to state how long it will be used in the user browser e.g. Session, 3 months, 2 years.
Required = Yes (has to be displayed by law)
Field Type = String

  1. "Type" please add this field, you need to state what type of cookie or module this is.

Label = Type
Comment = Under ePrivacy Law, you need to state what type of cookie or module this is e.g. HTTP Cookie, Pixel Tracker, Twitter Widget
Required = Yes (has to be displayed by law)
Field Type = String or Drop-Down Selector

Do in an extra line below the above data

  1. "Contact Details of Data Controller" please add this field, by law you have to give the DPO Contact Address of the cookie.

Label = Contact Details of Data Controller
Comment = Under ePrivacy Law, you have to give the DPO Contact Address of the cookie e.g. Cloudflare, Inc. 101 Townsend St. San Francisco, CA 94107. Attention: Data Protection Officer, [email protected]
Required = Yes (has to be displayed by law)
Field Type = TextArea

  1. "Contact DPO" please add this field, by law you need to give a link directly to the webpage of the DPO of the cookie.

Label = Contact DPO
Comment = Under ePrivacy Law, you need to give a link directly to the webpage of the DPO of the cookie e.g. Link to their Terms, Privacy, Cookie Privacy page etc.
Required = Yes (has to be displayed by law)
Field Type = String or repeater field

(Repeater Field I usually do two string fields: one for link and one for anchor - but totally up to you).

p.s. This is a screenshot of an example:

103

You should make the link external and with the correct codes e.g.

<a role="link" rel="nofollow external noopener noreferrer" href="https://www.google.com/intl/en/policies/privacy/" target="_blank">Privacy Policy</a>

Correct Layout to Pass GDPR + ePrivacy

Sorry I sound like I got OCD or ADHD, but the information needs to be in the correct order and locations to pass GDPR and ePrivacy, here is a screenshot of how the data fields would look like in your plugin to pass:

104

  1. Unambiguous specification, meaning that all the settings must be turned off by "default" when a user enters the cookie config screen. The only cookie allow to be on at default is the "Required - Session Cookie". I know this sounds really bad, but a way to make websites work great with this law is when a user clicks on the "Accept Cookies" button on the Banner then all the settings are turned on. But if the user never clicks that button and goes straight to the advanced settings page then all cookies etc. must all be turned off (except session etc.)

Rest of Backend

  1. Editing the "Cookie Groups" I couldn't find it at first, it would be easier to move the fields around like this:

101

Link to get the Information

Extra infomation how to fill out all these details, you can use the website found here to get the cookie information, DPO address and DPO hyperlink: https://cookiepedia.co.uk/

For example, see Google Analytics: https://cookiepedia.co.uk/host/google-analytics.com

Banner

First of all, it creates a gdpr_cookie_consent with HTTPonly and Secure and later on in PHP 7.3 you can turn on SameSite. So that looks perfect.

Is there an option in the backend to turn this section on/off, see screenshot. As it's not required and is an extra feature.

102

The Banner Description, the description text has different laws depending on which EU country. Therefore say I have a website of .co.uk which is for UK. Then I would use the UK Law for The Banner Description. I think I found a website that has a list of descriptions for each EU country. So I was thinking maybe we could create a drop-down menu of the list of EU Countries and let users either select these preloaded defaults or create their own description. Up to you, I can go find all the descriptions for you and add them to the lang files.

~I just remembered you have to state how long the banner cookie duration will last for. Let's say a user clicks on "Accept Cookies" button then a cookie is created for let's say 6 months, the user should be able to change this duration time in the setting page. Let's say the user wants to set it to "2 years" before seeing the banner again. This is another requirement under ePrivacy law. I believe the max duration is 2 or 3 years, but I can't remember where I read that?

README.md

I find it a bit hard to read and understand, plus various bits of information is missing, if you are happy, I can try and re-write it for you to make the reading easier for people to understand how to use the plugin for the first time. Some ideas I was thinking was to remove the repeated content and explain the feature list in an API list, of these settings:

  • include_css
  • hard_reload
  • ignore_behaviour
  • update_partial
  • update_selector
  • cookie_manager_page

(The Hard vs Soft Reload is a bit confusing when there is no soft_reload only hard_reload options etc.)

CSS and Javascript Code Snippets

I noticed you have a default CSS and some Javascript. My website design's use an "App Shell Model" where I have all my CSS in Partials and combine them into a single Page .htm file. Also, my Javascript is the same style but only having two files one at the top and one at the bottom. Then everything is either lazy-loaded or preloaded etc.

Basically what I am suggesting is a way to turn off the default CSS and then be able to copy and paste the CSS into my website design structure. So just add some extra notes to the README file explaining this and a location where I can download the CSS Script. Also the same for the Javascript if possible, just copy the code into the website directly.

I know the plugin code will update over time and if a user decides to do this way, then you could have the JS and CSS saved in a folder with a VERSION number for us to download off this github.

AMP-HTML (Mobile - Extension)

This is not important but an extra feature I would like to code for you and add on to the plugin. Basically, I use a Desktop PWA and AMP-HTML combination website design. The AMP-HTML pages I want to merge the AMP-Consent Module and your plugin together. Then the plugin can be used on AMP-HTML Pages.

Final Thoughts

That's basically everything I wanted to say. If you need help with anything, let me know and I can create some Pull Requests etc.

I haven't downloaded and installed the plugin yet on one of my websites. I just wanted to wait for a few more updates. But I plan to do a full test of the plugin in the coming days. For now I just tested out the plugin using your demo website at mall.offline.swiss

Thanks.

Multilanguage relations do not save

As relationship translations are still not working as of now, this might be a possible fix for the Cookiegroup -> Cookie relation translations.

This issue mentions a custom trait that overrides the multilanguage functionality for relationships. This might be a good temporary fix for ML relation fields.

rainlab/translate-plugin#209

addToggleEvents, if levels are not defined

Hi.

In '/components/cookiemanager/scripts.js' in function 'addToggleEvents' the levels can be empty, so setting 'levels.style.display = ...' will run into error.

I think it would be right to check if levels not undefined, so it should be eg.
levels && levels.forEach(function(level) { level.style.display = 'block'; });
and
levels && levels.forEach(function(level) { level.style.display = 'none'; });

Regards
RonMen

banner buttons dont seem to work

i setup some cookies with different manage levels, i went and tested the banner on clicking the decline button it seemed to do nothing, i was expecting it to set all the cookie levels to zero, likewise with the accept button i was expecting it to select all the cookie levels to the max levels but it also seemed to not do anything to the cookies in the manager screen?

Re-open Banner when add new script

Hi to all,
how do I re-open the banner to those who have already accepted the coockie previously once new scripts have been implemented?

Layout interfering

I used your plugin and everything works fine except for my little layout interference problem.
The Banner works as it should:
Bildschirmfoto 2020-04-14 um 19 39 40

But the problem is the CookieManager.
I read your description and didn't get it to work because my layout is interfering with the {% component 'cookieManager' %}
It either looks like this:
Bildschirmfoto 2020-04-14 um 19 43 03
or after pasting inline <style>...</style> before component like this:
Bildschirmfoto 2020-04-14 um 19 43 32

The biggest problem is that the tabs from the cookie groups cant be switched.
Can you please provide your default.htm (Layout) you used for your documentation so i can figure out where my problem is? I don't even know if your default.htm would help me in any way but i don't know what else i could do.

Thank you
and have a nice day!

Add a setting page to fill all legal informations

Hello,

Firstly, thanks for this awesome plugin that make our life far more easier when dealing with GDPR.

However, I have a small suggestion to make it even better. Since GDPR, our websites always have 2 different pages :

  • One about legal information (who is responsible of the content, what is the society behind the website etc...)
  • One about data privacy (cookie explaination, legal right of the visitor etc...)

In these 2 pages, there a some legal informations (society name, status, address, website url, informations about society CEO etc...). Actually, my base theme contain that 2 pages with some tokens like {SOCIETY}, {CEO_NAME} and I do a search and replace for each token to put the true values.

The next step to this would be to have a setting page to fill a required data, and then, a component to put on the page to automatically replace tokens with the corresponding value.

I could create a PR when I will have some time to add this, but I would like to know, before developping the solution, if you would be ok to merge it with your project, as I think that the GDPR module is the best place to handle that.

Thanks

Alex

Restructure README

  • Remove duplicate content
  • Make the reading easier for people to understand how to use the plugin for the first time

Split language files in frontend and backend

At the moment the frontend also uses the language file to load language dependent strings. As this language file is rather large it's not easy to create new languages for the front-end as you preferrably want to translate the entire file. This makes people hesitant to PR new translations.

Therefore I think it would be best to split the language files into frontend and backend, to speed up possible translations for the frontend. The backend does not need to be translated for every language, but the front-end should be translated into way more languages than the we have now.

Unable to use Klaro

Following the guide i have installed and configured the GDPR plugin.
i see the consent bar but the klaro manager doesn't appear... in javascript console i have this error Uncaught SyntaxError: Unexpected end of input (index) : 467

klaro_error

version.yaml syntax error

I'm getting an error when running php artisan october:up ...

A syntax error was detected in .../plugins/offline/gdpr/updates/version.yaml. Unable to parse at line 41 (near " fields to optimize ePrivacy confor
  mity. (*Very big thank you* to ayumihamsaki for giving a lot of feedback via our") at line 45 (near ".../vendor/october/rain/src/Parse/Yaml.php").

I think it's because the first comment for 1.1.1 is spanning multiple lines when it should only span a single line.
Hopefully you will fix?
Thanks.

Can't access the asset files

Hi

A strange error indeed, but have tested it on two separate servers. I just can't access the asset files. For example "plugins/offline/gdpr/assets/images/cookie-setup.jpg" and "plugins/offline/gdpr/assets/cookieBanner/banner.css". I can access asset files in other plugins but not in this. For example "plugins/flynsarmy/sociallogin/assets/marketplace/icon.png" works just fine.

I just get a 404 error, and I can't seem to find out where the problem lies. If i try to access plugins via "plugins/" all plugins with a assets folder responds with a 403, but the plugins without an assets responds with a 404. But this plugin contains an asset folder. But still i get the 404 response.

Anyone else experienced this?

I get these messages in the console:

GET http://newrobot.loc/plugins/offline/gdpr/assets/backend/backend.js net::ERR_ABORTED 404 (Not Found)
cookiegroups:34 GET http://newrobot.loc/plugins/offline/gdpr/assets/backend/sortable.js net::ERR_ABORTED 404 (Not Found)
cookiegroups:31 GET http://newrobot.loc/plugins/offline/gdpr/assets/backend/styles.css net::ERR_ABORTED 404 (Not Found)
cookiegroups:34 GET http://newrobot.loc/plugins/offline/gdpr/assets/backend/sortable.js net::ERR_ABORTED 404 (Not Found)
cookiegroups:35 GET http://newrobot.loc/plugins/offline/gdpr/assets/backend/backend.js net::ERR_ABORTED 404 (Not Found)

Why the "hard_reload" is no longer available?

Why the "hard_reload" is no longer available? Why did you remove this option? This is a useful option.
Here you didn't remove this propery. And here we have this option. But why did you delete the property declaration - public $hardReload = false; at the top of the CookieBanner class?
Thanks for the answer.

Apps default state always false

Hi,

Applications default state is always set to false even if you set it to true in plugin settings.

In app.js component's partial, line 5 :

            default: {{ app.default ? 'true' : 'false' }},

must become

            default: {{ app.application_state ? 'true' : 'false' }},

Thank's for plugin ! 👍

Translation in partials

Hi,

The new Cookie Manager component use different partials and specially a dedicated one for the submit button.
That's great for translation but ...

Why not use the "trans" filter for the default view !?

{{ 'offline.gdpr::lang.common.enabled' | trans }}

// give the word : Enabled (en), Aktiviert (de), Activé (fr)

It takes advantage of the provided translation's files, don't need specific partial for specific language (if lang file is present in the plugin).

ex:

<button type="submit" class="gdpr-cookie-manager__submit-button">
    {{ 'offline.gdpr::lang.common.save_settings' | trans }}
</button>

Permission to Expand your Plugin - Info and Help Section

Hi,

If you would allow me to expand your plugin and add a "Info and Help" Section, the new menu tabs would look like this:

41735643-1bfc1a82-7582-11e8-9fc5-2deed6df84da

It would link to a webpage location of: /offline/gdpr/info from there it would link to several webpages giving the following infomation.

An example of a bare bones content for the /offline/gdpr/info webpage will be the following screenshot:

untitled

Then I can go in to greater detail with the following Table of Contents Section and gives the users a full set of infomation on the Law, How to Use the Plugin and how best to set up things etc.

The webpages will use HTML, PRISMJS for the Coding and will be able to switch to other langues such as French and German etc. (Won't be using Markup as I use lots of new HTML5 semantics).

This will then allow to add extra infomation in the future if other new sections get added to the plugin.

Any other content ideas, or suggestions are welcome.

This links on to the two issues found: 11 and 12.

Let me know if it's ok and I will be happy to create the whole section for you.

(I decided to write this issue and show you what I am thinking right now, so you can understand my suggestions I have made for the plugin to pass GDPR and ePrivacy).

customizing banner and manager

First of all when the checkbox is checked to include css the banner and the manager are showing up in blank html, no css is added.

is there a way to customize the html that the banner and the manager are outputting, so i don't have to override the css classes and I can customize the banner, message etc.?

Fix cookieManager layout

image

  • Make all settings off by default (except session cookie) (daa9258)
  • Add option to choose the lifetime duration of the gdpr_cookie_consent cookie
  • Add an option to not include the default JS code
  • Use html_clean for HTML outputs (d4fff52)

via #8

Upgrade the php files to php7 strict standard

Minor request feature, but this is something I do with all my plugins and think it should be added to yours.

declare(strict_types=1);

Add the following to the top of all the php files.

So for example Plugin.php file would be:

<?php 

declare(strict_types=1);

namespace OFFLINE\GDPR;

use Backend\Facades\Backend;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Support\Facades\Session;
use OFFLINE\GDPR\Classes\Cookies\ConsentCookie;
use OFFLINE\GDPR\Components\ConsentManager;
use OFFLINE\GDPR\Components\CookieBanner;
use OFFLINE\GDPR\Components\CookieManager;
use OFFLINE\GDPR\Console\CleanUp;
use OFFLINE\GDPR\Models\CookieConsentSettings;
use OFFLINE\GDPR\Models\DataRetentionSettings;
use System\Classes\PluginBase;

class Plugin extends PluginBase
{
..

I can go through all the files and add that for you if you like.

Add "Dismiss/Show" Feature

The Law states that the banner should have the following features:

  • Accept
  • Reject
  • Dismiss
  • Show

Accept

When the user clicks on the button "Accept" they are ticking all the options in the advanced setting page.

Reject

When the user clicks on the button "Reject" they are un-ticking all the options in the advanced setting page.

Dismiss

The user does not have to decide straight away! They can decide at any time they choose. This would be simply a close button on the banner to hide it.

Show

The user does not have to decide straight away! They can decide at any time they choose. This would be simply a show button on the banner to display it. OR THE WEBMASTER COULD CREATE A LINK IN THE FOOTER FOR EXAMPLE TO THE ADVANCED SETTINGS WEBPAGE.

Example with the current Banner Design

41365745-803f0ce6-6f3a-11e8-93ff-7dc0f683e241

Show as a Button or Footer Link

You could do one of three possible things for the Show, either create a button in the bottom of the screen in the bottom left or right hand corners. Or create a footer link (which would be the best method).

Example of the three methods: (I think footer method is best option)

aaa

Note: The Footer link is the best method and should be mentioned in the updated doc's

Invalid security token

Hi there,

I get an "Invalid security token" message when saving the selection within the cookieManager page. Anything missing here?

Regards
RonMen

Settings of group and module are not accepted

Hi.

We use a setting for group that is not activated to be required for the website to function and work but we have a cookie/module that should be initialy activated, but it isn't. Is there an issue with the implementation?

Regards
RonMen

Clicking 'Accept' won't trigger code, advanced settings page works

While I'm on the advanced settings page and give consent to my cookie provider and hit save, the gdpr cookie ist set and the code in my gpdr.htm partial is triggered and shown (I used some simple HTML output to test). So this works.

But when I click the 'Accept' Button on the banner, the code in the partial is not outputted.

Looking at the network request I see a POST request and the JSON Answer is gdpr: with content {"gdpr":""}, which somehow looks empty? Is this this some kind of misconfiguration?

Any help is greatly appreciated!

List of things I am working on with this plugin

Just to let you know, what I am up to. Here is a list of things I will be working on for you:

  • List of Purpose (Descriptions) for Cookie Groups - 20
  • List of Purpose (Descriptions) for Cookie Items - 20
  • Do a Full Test on the Plugin, and check on the Cookie Manager. I probably ask you some questions about the cookie settings before I begin the write-up.
  • Write up the Notes for "Cookies and Modules User Guide" - 28 and 12
  • Write up the Notes for "Cookies and Modules Setup Example" - 28 and 12
  • Info Section - Add an example using AMP-HTML and the Plugin Together 38
  • Look into adding schema and the plugin (I will speak to Dan at Google about this as he is in charge of schema) - 13

Update Cookie Group Section to add Preloaded List

~Just to let you know I am currently working on a list for:

Cookie Groups > Form > Purpose

Should be done this week. Looks like this so far:

untitled

Thinking of updating the Cookie Group screen to this, when I finish putting together the list of Purpose Desciptions for a bunch of cookies, see screenshot of idea:

untitled

Will finish the list of in few days time, I think easy to custom code a form partial for this (The Previewer bit).

Issue?

OK, I installed plugin and followed your tutorial but ... I have few things that I can't seem to get to work.
First: Consent on the bottom of the screen - decline and accept buttons don't work, advanced settings do.
Second: On advanced settings page I choose that I allow analytics cookie, but page wont start tracking, code works cause if I put it in layout file, then tracking works.

I have been searching for few hours now and I'm really stuck, maybe You can help me.

Advanced setting page, I have made all cookies active and turned Start-up selector on, but still their not turned on by default.

choosing decline turns all toggles to "enabled"

What should happen
When choosingdecline on the cookiebanner, and navigating to the cookiemanager, all toggles except the required are turned off.

What actually happens
When choosingdecline on the cookiebanner, and navigating to the cookiemanager, all toggles except the required are turned on.

.remove unsupported on IE11

The cookiebanner buttons are using .remove and on IE this isn't supported so you can't close/ accept the cookie banner

This issue maybe elsewhere in the plugin as well but we've only spotted it on the cookie banner

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.