Giter Site home page Giter Site logo

dmind-gmbh / extension-cookieman Goto Github PK

View Code? Open in Web Editor NEW
34.0 5.0 17.0 5.15 MB

A GDPR tracking consent popup for the content management system TYPO3. It asks for approval to include tracking objects (cookies, images or any HTML) and includes the objects when consented.

Home Page: https://extensions.typo3.org/extension/cookieman

License: GNU General Public License v2.0

PHP 34.48% HTML 35.51% JavaScript 24.17% Shell 1.50% CSS 4.34%
typo3 gdpr cookie opt-in typo3-extension typo3-cms-extension consent cookies

extension-cookieman's People

Contributors

bucheggeronline avatar cundd avatar dependabot[bot] avatar drprofesq avatar ghermens avatar hoermannklaus avatar jonaseberle avatar medarob avatar nicobayati avatar okroener avatar philippmaurer avatar prathers avatar sebkln avatar sypets avatar truetype avatar webian 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

Watchers

 avatar  avatar  avatar  avatar  avatar

extension-cookieman's Issues

The numbered array of a cookie group needs a fixed order

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS
  • Can you reproduce the problem on TYPO3 v9.5 LTS

Description

The trackingObjects which are listed in a cookie group (e.g. "marketing") must be consecutively numbered from 0 upwards. If a group is not configured this way, the inject code will not be executed.

This issue will affect only cookie groups with wrong ordering, not all groups.

Steps to Reproduce

  1. Install the extension.
  2. Add the static template.
  3. Open the frontend and accept all cookies: you will get 4 example log entries in the browser console.
  4. Open the extension's setup.typoscript and change 3 = Bing to 4 = Bing: the browser console will be empty on reload.
  5. Add 2 = Matomo to the trackingObjects of the "mandatory" group: the Matomo log entry will show in the browser console again.

Expected behavior:

The common usage of numbered arrays in TypoScript are flexible (e.g. page.10, page.20, โ€ฆ). It would be easier for integrators to configure the cookie groups if the current behaviour was loosened.

Versions

On TYPO3 v8.7 LTS: cookieman v2.2.1
On TYPO3 v9.5 LTS: cookieman v2.2.2

Enable Do-Not-Track cookie in examples, beautify DNT-message

Feature Request

Is your feature request related to a problem? Please describe.
The Do-Not-track message header that is shown above a group could be prettier.

  • Also the TypoScript examples do not enable DNT for the example groups by default.

Describe the solution you'd like

Additional context
Reacting and incorporating the user's do-not-track setting should be best practice for consent solutions. cookieman is already up to that - yet we should make it the default in all examples, too.

Legal reference: EU General Data Protection Regulation
Article 21 (5.)
https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:02016R0679-20160504&from=DE#tocId30

Make it configurable whether changing the setting for a group triggers the reload of the page.

Feature Request

For example, if you use the Google Tag Manager , instead of the "inject"-method, to control whether a code snippet should be inserted, it may still be necessary to reload the page if the user changes the settings for a group.

So it would be very useful if you could configure, whether the change of the settings of a specific group triggers the reload of the page.

Like this:
plugin.tx_cookieman.settings.groups.mygroup.triggerPageReload = 1

Fluid Integration / Plugins / UIkit Theme

Feature Request

Is your feature request related to a problem? Please describe.

I would like to use plugins based on the setting in Cookieman (ePrivacy), which, for example, integrate a Google Maps map (go_maps_ext). Conditions in my own fluid template, whether a code can be executed (based on the user preference) would also be great.

Describe the solution you'd like

Currently not yet clear. I would start a discussion here.

Describe alternatives you've considered

Currently not yet clear.

Additional context

Maybe Cookieman can help me with the task, or are there other approaches? Maybe it's not up to Cookieman?

In return, I can provide a theme for UIkit as part of my project. I really like the structure of Cookieman. Thank you for sharing in the community. I hope that it comes to a productive use.

Just a typo in the language files

Thanks a lot for this wonderful extension!
I just found a little typo in the default language file

File: dmind-gmbh/extension-cookieman/blob/master/Resources/Private/Language/locallang.xlf
Line: 17
Id: introText
Property: source

This website uses cookies. Those have two functions: On the one hand they are providing basic functionality for this website. On the other hand they allow us to improve our content for you by saving and analyzing anonymized user data. You can redraw your consent to to using these cookies at any time. Find more information regarding cookies on our %1$s and regarding us on the %2$s.

One of the "to"-words should be enough.
Please bear with me for not creating a pull request regarding this.

split shipped TypoScript into Base + Examples

Feature Request

Is your feature request related to a problem? Please describe.
It is not ideal that examples are mixed into the base setup.

Describe the solution you'd like
"Examples" should be a separate TypoScript-template that can be included optionally.

Describe alternatives you've considered
For the time being you could disable all shipped examples:

 plugin.tx_cookieman.settings.trackingObjects >
 plugin.tx_cookieman.settings.groups >

JS API endpoint to directly check if a specific trackingobject is allowed

Feature Request

Is your feature request related to a problem? Please describe.
If you are coding an action on your website's frontend, that you only want to do if the user accepted it in the cookieman extension, you currently need to check if the corresponding group that trackingobject is in was accepted. Therefore, you always need to know the group that the cookie/request is in when programming it. Changing one cookie from one group to another also requires changes in your website logic.

Describe the solution you'd like
I would like to have an API endpoint to which i can provide the name of a tracking object (e.g. name of the cookie) and it would internally find out its corresponding group and return true if that group was accepted, or false if it was not.
If the tracking object is present in multiple groups, it should be possible to specify the endpoint behavior in a TypoScript settings. It should either return true if all corresponding groups were accepted, or it should return true if at least one was accepted.
By default, the more restrictive one should be set.

Describe alternatives you've considered

  • Instead of creating a new endpoint, it would be a possible solution to provide a trackingobject's name to the "hasConsented" enpoint. This solution though would either require an extra parameter for that endpoint to specify whether or not the name of a group or a trackingobject was provided, or would cause troubles if the name of a trackingobject is also the name of a group.
  • I created my own dictionary in which i specify the group for each tracking object, so before i call the API endpoint, i get the group of my trackingobject and check that then. This works fine, but still requires me to change that one place in my code if i should change the group of one of my tracingobjects.

have Js/Injects/ folder

Injecting JS code by source script(s) is the prefered way to account for security policies. There is an example script in /Resources/Public/Js/example-inject.js

I suggest to create a folder /Resources/Public/Js/Injects as there may be many such inject scripts created. There is only one example in the extension and in an override structure in the site package extension may not be other script than inject scripts. But I would add it anyway.

Suppress modal for Google PageSpeed / Lighthouse

Feature Request

Is your feature request related to a problem? Please describe.
Just showing any modal on page load costs around 10 points in Google PageSpeed on a site I am currently working on.
This is mainly due to the page reflow but also due to the work for the main thread.

Describe the solution you'd like
Although that might be a disputable solution, I'd like to have the modal suppressed for the User Agent (https://stackoverflow.com/questions/16403295/what-is-the-name-of-the-google-pagespeed-user-agent).

Describe alternatives you've considered
Maybe a timeout could also help to get out of the initial main rendering thread.

settings for MapBox

Hi,
no idea how common MapBox is, but it uses quite a list of cookies and that may just be nice to offer.

example how to use custom JS with Content-Security-Policy script-src

Feature Request

Is your feature request related to a problem? Please describe.
Our examples use inline JS like
console.log('cookieman: I would inject Matomo now...')

We should make this CSP-safe.

Describe the solution you'd like
We should a) change our examples and b) document to avoid inline and rather use external files.

Button "continue with mandatory cookies only" (without group checkboxes)

Feature Request

Implement a button like "continue with mandatory cookies only".

Is your feature request related to a problem? Please describe.
When implementing very simple consents (e.g. only 2 groups: essential and marketing) it might be desirable to get rid of the checkbox and just add 2 buttons: "accept marketing cookies" / "continue with mandatory cookies only".

Describe the solution you'd like
Add a [data-cookieman-accept-none] HTML attribute to mark such buttons.

Describe alternatives you've considered
You could solve it in the theme.js but I think it is a pretty common request.

[data-cookieman-settings] could be smaller

Feature Request

Is your feature request related to a problem? Please describe.
[data-cookieman-settings] contains all TrackingObjects, no matter if they are used or not.
We could save some bytes.

Describe the solution you'd like
It should only export to HTML those settings that are really needed.

Cookies.remove(itemKey) doesn't work

If a user allows all (or some categories of) cookies and then reduce it to only functional cookies again, the cookie deletion (e.g. _ga, _gid) via Cookies.remove(itemKey) in cookieman.js (line 289) doesn't work in Version 2.4.2/2.4.4 / TYPO3 9.5. The setting of new cookies is prevented as expected, only the existing but not allowed cookies remain.

I solved it by replacing this line by
document.cookie = itemKey + '=; Path=/; Domain=mydomain.de; Expires=Thu, 01 Jan 1970 00:00:01 GMT;';

Is it a bug, feature or misconfiguration?

Call to a member function getConfiguration() on null

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS
  • Can you reproduce the problem on TYPO3 v9.5 LTS
  • Can you reproduce the problem on TYPO3 v10.4 LTS
  • Can you reproduce the problem on TYPO3 master

I can't reproduce the error, just during an installation. This applies to TYPO3 8.7 with PHP 7.0.

Description

As soon as I activate the static templates I get the error message

Uncaught TYPO3 Exception: Call to a member function getConfiguration() on null | Error thrown in file /html/example.de/vendor/typo3/cms/typo3/sysext/extbase/Classes/Configuration/ConfigurationManager.php in line 124. Requested URL: https://www.example.de/de/

For other TYPO3 installations with the same versions, this works without any problems.

Versions

TYPO3 8.7.28 composer based.

PHP OpCode Cache and TYPO3 Cache cleared. APC Cache deactivated.

delete cookies after consent revocation

Feature Request

Some have the expectation that cookies are removed when the user revokes the consent. I've seen that in this review for example https://jweiland.net/know-how/internet/ueberblick-cookie-extensions-und-externe-dienstleister.html#c6980 (German).

Until here that was not something we considered necessary for a consent plugin like cookieman.

We've rather seen cookieman as something that allows getting user consent to using tracking objects in general (like pixels, local storage, HTTP-/HTML-, HTTP- cookies, ...) - not just cookies. We expect the current discussion evolving so much around cookies only to soon widen towards tracking techniques in general.

Cookieman allows that e.g. facebook posts or Google Analytics are not loaded without consent, but it does not clean any already set tracking objects.

We could add the functionality to remove HTML-cookies or even local/session storage items when a consent is revoked.

We are interested to know what you think. Do we need that? Or should we make more clear via the documentation that cookieman does not clean cookies? Or ...?

constants for dataProtectionDeclarationPid and Imprint are ignored in multidomain setup

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS
  • Can you reproduce the problem on TYPO3 v9.5 LTS
  • Can you reproduce the problem on TYPO3 v10.4 LTS
  • Can you reproduce the problem on TYPO3 master

Description

We have a multi domain setup and configured the extension as described in the documentation.
We have set the IDs for dataProtectionDeclarationPid and imprintPid in the constant.txt for each site.

plugin.tx_cookieman.settings.links.dataProtectionDeclarationPid = 900
plugin.tx_cookieman.settings.links.imprintPid = 590

We have declarated this for every website with different IDs so each constant has different values per website.

Expected behavior:

The urls to the DataProtectionPage and Imprint should change. Each website has his own Imprint and DataProtectionPage.

Actual behavior:

Problem: On each site the url for the Imprint and DataProtectionPage are the same. The IDs are correct in the Template -> ObjectBrowser, but not in the Frontend.

Versions

TYPO3 9.5.13 and cookieman 2.4.2

preselected = 1 in own group

Pre-selection of an own group not possible

Prerequisites

  • TYPO3 v9.5.15
  • EXT:cookieman 2.4.4

Description

TS: plugin.tx_cookieman.settings.groups.statistik.preselected = 1
With this setting I cannot achieve that the group statistik is pre-selected.

Option to hide CookieInfo-Table

Hi,
it would be nice to add a option for groups to hide the CookieInfoTable, so there would be no need to overwrite the default templates.

For example:

TS:

groups {
	OpenStreetMap {
		hideCookieInfos = 1
	}
}

Template (Popup.html):


<f:if condition="!{group.hideCookieInfos}">
	<div class="table-responsive">
	...
	</div>
</f:if>

Thank you and many regards
Andi

Respect do-not-track-settings (navigator.doNotTrack)

Feature Request

Basic
Enabling respect-settings in TypoScript. When set "Respect Do-Not-Track-Settings in Browser", NO cookie-banner is shown when this user visits the website. Automatically all settings are set to minimal (only necessary). That means: No tracking, block all external content.

A user with DNT-settings will not see the same
When I change my browser settings in this way, I am aware that I cannot see a lot of services. That can be fallback font if google-fonts are used, no re-captcha, no youtube-embedding, not google-maps (...).

Example youtube-video or google-maps
Not sure how this in handled here, but cookie services sometimes replace embeddings like youtube-embed with an image and a message like "we need your approval...". When clicked on a blocked item, cookie-settings should popup. When checked for example "allow youtube" the youtube-film should start when closing the cookie-settings-box

Benefit
Experienced users with this settings can visit websites without being forced to click on a cookie-consent-tool.

[FEATURE] Allow adding external scripts (affects strict Content Security Policy)

Feature Request

Is your feature request related to a problem? Please describe.
Websites with the additional HTTP header Content-Security-Policy usually block all inline scripts in order to prevent XSS attacks. In such an environment, all necessary scripts must be moved to external files (like Matomo).

The current inject solution of EXT:cookieman only supports inline code. External scripts like the following will not be rendered:

plugin.tx_cookieman.settings.trackingObjects.Matomo {
    inject (
        <script src="https://domain.com/matomo.js" type="text/javascript" async="async"></script>
        <script src="https://domain.com/typo3conf/ext/cookieman_config/Resources/Public/JavaScript/matomo-trackingcode.js" type="text/javascript"></script>
    )
}

Describe the solution you'd like
An approach where you're allowed to add external scripts. I'm not sure how easy that could be accomplished, though.

Describe alternatives you've considered
Adding the HTTP header option 'unsafe-inline' would allow to use EXT:cookieman in environments with Content-Security-Policy, but: the protection from cross-site scripting would disappear completely, too.

Additional context
I really like your general approach for the Opt-In issue in TYPO3! Currently I'm playing around with this extension, maybe I can come up with some improvements. If you want a reStructuredText documentation, I'd gladly send a PR.

Keep up the good work!

shy entities in locallang files are processed differently with v.2.3.4

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS

Description

After upgrading the extension from v2.2.4 to v2.3.4, the &shy; entities in the translations files are rendered like this:

Hin&amp;shy;weis zu Coo&amp;shy;kies

Steps to Reproduce

  1. Update extension
  2. Remove any custom configurations and use second static template (demo)

Versions

TYPO3 v8
cookieman v2.3.4

Consent not showing in 8.7 LTS, TypeError: o is null

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS
  • Can you reproduce the problem on TYPO3 v9.5 LTS
  • Can you reproduce the problem on TYPO3 v10.4 LTS
  • Can you reproduce the problem on TYPO3 master

Description

The PopUp won't show, the following error is thrown in the browser's console

TypeError: o is null
o = document.querySelector('[data-cookieman-settings]'),

Steps to Reproduce

  1. installed the latest version of the plugin
  2. added the static template to the root template
  3. added the necessary pids in the plugin configuration

Expected behavior: the popup should show

Actual behavior: it does not show and the js error above is thrown

Versions

2.3

DoNoTrack message is only rendered once

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS

Description

If the TypoScript settings for DoNotTrack are added to more than one cookie group, the DNT message is only rendered in the first cookie group.

respectDnt = 1
showDntMessage = 1

Steps to Reproduce

  1. Install the extension.
  2. Add the static template.
  3. Add a new cookie group (and set some demo cookies):
plugin.tx_cookieman {
    settings {
        groups {
            mandatory {
                preselected = 1
                disabled = 1
                trackingObjects {
                    0 = CookieConsent
                    1 = fe_typo_user
                }
            }

            marketing {
                trackingObjects {
                    1 = GoogleAnalytics
                    2 = GoogleTagManager
                    3 = Bing
                }

                respectDnt = 1
                showDntMessage = 1
            }

            analytics {
                trackingObjects {
                    0 = Matomo
                }

                respectDnt = 1
                showDntMessage = 1
            }
        }
    }
}

Result after step 3: The DNT message is rendered only in "marketing".

  1. Now remove the "marketing" group. New result: The DNT message is now rendered in "analytics".

Expected behavior:

The message should be rendered in each cookie group that respects the DoNotTrack option.

Actual behavior:

The message is only rendered once.

Versions

  • TYPO3 8.7.29
  • cookieman 2.2.4

Additional note

I haven't tested if this behaviour is limited to rendering the message, or if the DoNotTrack browser setting isn't respected for the other group, too.

Unknown namespace in Partials/TableRowsByGroup.html

The error 'c' is a unknown namespace appeared while referencing the default Partial/TableRowsByGroup.html in an own Template, because the Dmind/Cookieman/ViewHelpers were used, but not referenced.

Please declare non global ViewHelpers where the are used.

update js-cookie plugin to (at least) 2.2.1 or v3RC

Not really a feature or bug, maybe an optimization:

I wanted to use the javascript library js-cookie myself and noticed it's already used by cookieman, so I don't need to include it twice.

When I compared the used versions I noticed that js-cookie v2.2.0 from the year 2017 is currently used in the extension. There is a newer version 2.2.1 available from 2019 and also a first release candidate for v3 from 2020.

I think an update to version 2.2.1 is a good option because there was the following fix:

  • Prevent XSS in the cookie attributes

Not sure if v3 will work out of the box with cookieman.

Link: https://github.com/js-cookie/js-cookie/releases

Save / Protocol User-Consent

Hi,

after a long conversation with an external 'data protection officer' (Datenschutzbeauftragter), he said that the user-consent must be saved in a protocol with timestamp and IP-Addresse, especially for US-Services like GoogleAnalytics and YouTube.
Is there a solution planned or is it better to build a own solution (database or file based)?

Regards from Bavaria
Andi

Preselected Groups

preselected option only works if the group is disabled
I use the version 2.3.10 and TYPO3 8.7

Granular Consent

Hi guys,

are you planning a more granular consent for future versions? This would offer the choice of single providers (like google maps, google analytics, youtube ...) instead of categories.

Best regards
Michael

add docu for changing default template via root paths

Feature Request

Maybe it's possible add the following to the documentation if that can be used and there are no drawbacks. In the current documentation there is a "how-to" change or add an existing template section (Create a new theme or adapt an existing one).

I think it's missing the explanation that it's also possible to change the default templates via adpating the root paths, for example add this to your own setup.typoscript extension:

page {
	1365499 = FLUIDTEMPLATE
	1365499 {
		templateRootPaths {
			150 = EXT:my-ext/Resources/Private/cookieman/Templates/{$plugin.tx_cookieman.settings.theme}/
		}

		partialRootPaths {
			150 = EXT:my-ext/Resources/Private/cookieman/Partials/
		}

		layoutRootPaths {
			150 = EXT:my-ext/Resources/Private/cookieman/Layouts/
		}
	}
}

That way, you don't need to add cookieman-theme.css and cookieman-theme.js to your own theme because the default files in EXT:cookieman are used.

Not sure if there are any disadvantages to this approach? Any recommendations?

TYPO3 v8 compatible version 2.2.4 uses new TypoScript import syntax

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS

Description

The TER download of EXT:cookiebot v2.2.4 includes the new import syntax for TypoScript in the file Configuration/TypoScript/Example/setup.typoscript:

@import 'EXT:cookieman/Configuration/TypoScript/TrackingObjects/*.typoscript'

I guess this import can be dropped completely, as the TrackingObjects are already loaded from the default setup.typoscript (which also includes the general settings).

Add reST documentation

A reStructuredText documentation on docs.typo3.org is the best way to introduce and explain the extension to users.

I will take care of this. The finished documentation will include the usual sections. The contents are taken from the current README file. I plan to extend it with a FAQ or Troubleshooting section; maybe in a later step.

make it configurable to let the cookie consent popup stay in focus when the user clicks outside the popup

Feature Request

Currently, if the user clicks anywhere else than on the "use all cookie"-button or the "settings"-button the cookie popup disappears. Which means the user hasn't given any consent to use cookies at all. If the user navigates to another page, the popup appears again which is good.

Let's say that the user doesn't want to give any consent again, so he clicks again somewhere else to make the popup go away. The user navigates to a fe-login form and now wants to log-in. He fills out the form with username and password, clicks on the "login"-button and now the fe_typo_user cookie is automatically set without consent. That is a problem, I would say.

Describe the solution you'd like
The solution would be that the user does not has the option to make the cookie consent popup go away without any consent (which is not so user friendly) or you have to to disallow TYPO3 from creating the fe_typo3_user cookie (and I don't know if that is possible). If the consent for the fe_typo3_user cookie isn't given, the login form shouldn't work. There has to be a message like "You first need to accept the mendatory cookies/fe_typo3_user".

Therefore a selection of cookie consent is mandatory and the user shouldn't have the option to make the popup go away. Either the user chooses only to accept the necessary cookies or he accepts all cookies. Either way, he has to accept the group where the fe_typo_user cookie is included.

Additionally thoughts:
Maybe it's also enough to change the consent text so that the user accepts the mendatory cookies if he clicks anywhere else (to make the consent popup go away). Better would be one of the other solutions...

Add a clearly labelled "decline" button to the default themes

Feature Request

Is your feature request related to a problem? Please describe.
We have had the request from client's Data Officers to provide a clearly labeled "decline" option.

Currently we have the buttons save/save all where it might be unclear that "save" means "decline" in the default state.

Describe the solution you'd like
It is already possible to use data-cookieman-accept-none in custom templates. It should be included in the default themes, though.

When "decline" is the same as "save" (this is the initial state), "save" should not be shown for UX reasons.
The condition could be "show 'save button' if a) the current state is not either 'all cookies' or 'none' or b) after any changes have been done in the current modal".

Describe alternatives you've considered
It is already possible to use <button data-cookieman-accept-none data-cookieman-save> in custom templates. It should be included in the default themes, though.

Additional context
Current clarifications of the European Data Protection Board: https://edpb.europa.eu/sites/edpb/files/files/file1/edpb_guidelines_202005_consent_en.pdf

provide JavaScript event handlers/hooks

Feature Request

Is your feature request related to a problem? Please describe.
a) When working with included tracking objects you will want to know if it has been included and loaded. The available hasConsented() is not enough to know if an object is available.
b) It might also be interesting to know when a user has closed the popup. A use case would be to start a video or slider when the user seems ready for that or show another popup with a newsletter registration.

Describe the solution you'd like
One should be able to register for JavaScript events. They should provide information about at least a tracking object injection and in the case of <script>s its finished downloads.

I envision using standard JavaScript events (https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Creating_and_triggering_events) - to my knowledge this is supported IE9+

cookieman.events.addEventListener('injected', function(e) {
    console.log(e.trackingObjectId + ' just injected these elements:', e.injectedElements)
}

cookieman.events.addEventListener('scriptLoaded', function(e) {
    console.log('script was downloaded', e.scriptElement, e.trackingObjectId)
}

Describe alternatives you've considered
a) You could inject your <script> like <script onload="myCallback"...> but that would be blocked if Content-Security-Policy does not allow 'unsafe-inline'.
b) You could use your theme's cookieman.show() and cookieman.hide() functions to capture the current state. Actually that might be enough and no additional event might be necessary.

Simplify implementing content consent like Youtube/Google Maps/facebook/...

Feature Request

Is your feature request related to a problem? Please describe.
Currently, implementing e.g. a consent before loading a Youtube video requires quite some custom code to interact with cookieman.

As this is becoming more common, cookieman should provide an easier solution.

Describe the solution you'd like
It should allow to use Fluid templates for the banners.

Preselected Options only work, if the option is disabled

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 master

Description

If you set an optiongroup to preselected = 1 over TypoScript, but do not set it to disabled, the group is still unselected in the frontend.

Steps to Reproduce

  1. Set up cookieman and create a new group
  2. set the new group as preselected
  3. Load the frontend and see the error. The group is not selected.

Expected behavior:

The group should be preselected, if the group was not deselected earlier.

Actual behavior:

The group is deselected.

Versions

Tested with 2.3.10, but the same error can be seen in current master branch.

Code - Problem

The internal function "loadCheckboxStates" (ln. 80, cookieman.js) is called in the "init" call and resets the group checkboxes accordingly to the state of the current cookie settings. It uses "consentedSelectionsAll" for that, which can not differentiate between a cookie which has all states deselected and the state that no cookie is set at all. Therefore it interprets the lacking of the cookie on the initial call as a user who deselected all (not-disabled) options.

Possible Solution

The "loadCheckboxStates" function should check at first, if the consent cookie was set at all. (Like in the showOnce method) If not, the checkbox states should not be changed.

add FAQ: Content-Security-Policy

Feature Request

Is your feature request related to a problem? Please describe.
People that implement tracking solutions might implement CSP on their sites, too. As cookieman plays a role in including assets, it should be stated what that role is.

Describe the solution you'd like
We should have some words about CSP and cookieman in the manual.

Iframe handling?

It would be nice if there were some kind of handling of iframes which uses cookies.
For example YouTube code like this:

<iframe width="420" height="315"
src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>

No cookie list shown

Bug Report

Prerequisites

  • Can you reproduce the problem on TYPO3 v8.7 LTS
  • Can you reproduce the problem on TYPO3 v9.5 LTS
  • Can you reproduce the problem on TYPO3 v10.4 LTS
  • Can you reproduce the problem on TYPO3 master

Description

I setup a configuration but the div#cookieman-acco remains completely empty.

Is there something wrong in my setup or is there more to configure to make it work?

Using bootstrap from https://extensions.typo3.org/extension/bootstrap_package.

This is my TSconfig:

temp.tx_cookieman.settings.groups.mandatory < 
plugin.tx_cookieman.settings.groups.mandatory

plugin.tx_cookieman.settings {
  trackingObjects {
    # extend the existing configuration for 'Matomo'
    Matomo {
      inject (
<script type="text/javascript">
  var _paq = window._paq || [];
  // require user consent before processing data
  /* tracker methods like "setCustomDimension" should be called before "trackPageView" */
  _paq.push(['trackPageView']);
  _paq.push(['enableLinkTracking']);
  (function() {
    var u="/xxx.xxx/";
    _paq.push(['setTrackerUrl', u+'matomo.php']);
    _paq.push(['setSiteId', '1']);
    var d=document, g=d.createElement('script'), s=d.getElementsByTagName('script')[0];
    g.type='text/javascript'; g.async=true; g.defer=true; g.src=u+'matomo.js'; 
s.parentNode.insertBefore(g,s);
  })();
</script>
      )
    }
  }

  # reset existing groups
  groups >
  groups {
    # copy of default group 'mandatory'
    mandatory < temp.tx_cookieman.settings.groups.mandatory

            mandatory {
                preselected = 1
                disabled = 1
                trackingObjects {
                    0 = CookieConsent
                    1 = fe_typo_user
                }
            }

            analytics {
                trackingObjects {
                    0 = Matomo
                }

                respectDnt = 1
                showDntMessage = 1
            }
        }
    }
}

plugin.tx_cookieman._LOCAL_LANG {
  en {
    trackingobject\.Matomo = You can translate the name, but you do not have to.
    trackingobject\.Matomo\.desc = My own tracking pixel does not really track you. It's just here to cheer you up.
    group\.mandatory = My group is my castle.
  }
  default < .en
}

Steps to Reproduce

  1. Set TSconfig

Expected behavior: A list of the pre-configured cookies is displayed.

Actual behavior: No list of the pre-configured cookies is displayed.

Versions

TYPO3 v.10.1.0
Cookieman v.2.2.3
Bootstrap Package v11.0.1

Uncaught TypeError: Cannot read property 'show' of undefined

TYPO3 9.5.20
cookieman 2.5.1

When clicking the accept or deny button, i get the error above in the chrome console. See attached screen.

In Firefox i get the error:
Uncaught TypeError: t is undefined

Hint:
If i exchange the <div id="cookieman-modal"
data-cookieman-showonce="1"
data-cookieman-settings...

part with the code from your demos, it works.

add FAQ: how do I add a group / tracking object?

Feature Request

Is your feature request related to a problem? Please describe.
Supplemental to the documentation, it would be nice to have a 1. 2. 3. manual for how to add a new group or tracking object.

Describe the solution you'd like
This could go to the FAQ section in the manual.

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.