Coder Social home page Coder Social logo

dirkpersky / typo3-dp_cookieconsent Goto Github PK

View Code? Open in Web Editor NEW
33.0 2.0 25.0 1.8 MB

TYPO3 Extension: Enable a cookie consent box. Let you visitors control the usage of cookies and load script or content after a consent. (ePrivacy, TTDSG)

License: GNU Affero General Public License v3.0

HTML 18.39% PHP 33.66% JavaScript 38.36% SCSS 9.59%
typo3 extension cookieconsent dsgvo cookie eprivacy ttdsg

typo3-dp_cookieconsent's People

Contributors

audef1 avatar aw029 avatar baachi avatar dirkpersky avatar franzholz avatar grigo91 avatar maikschneider avatar mario-seidel avatar mkupi avatar peteroberzier avatar peterwimmer avatar squadt avatar ste101 avatar whiteroom avatar worksdev 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

typo3-dp_cookieconsent's Issues

Language-Files

I try to adjust the text for the messages.

plugin.tx_cookieconsent._LOCAL_LANG.de {
message = myMessage
dismiss = myDismiss
link = myLink
}

does not work for me.

config value for lifetime of cookie

Can you insert a config value for lifetime of the "dp_cookieconsent_status" cookie?

Or can I already set this via javascript? I did not get this to work. I did not find a way to set it.

Scripts not loaded in Typo3 6.2

Hello,

i installed the extension via extension manager in Typo3 6.2.
Then selected static templates on root page.

Demo-Typoscript code is in Typoscript template.

But the javascripts are not loading in frontend and the cookie consent bar is not showing.

www.kontron-electronics.de

Thank you,
BR Andreas

Revokable doesn't work

I want to hide the revoke button in front-end and i tried to set revokable to false, but it didn't help... What is the function of 'revolke' then?

Bug: Force Accept

<button
            onclick="window.DPCookieConsent.forceAccept(this)"
            data-cookieconsent="statistics"
    >allow cookies and play video
    </button>
    <button
            onclick="window.DPCookieConsent.forceAccept(this)"
            data-cookieconsent="marketing"
    >allow cookies and play video
    </button>

^^ only set 1 checkbox flag, and removed the old state

Event vor Abschluss der Initialisierung

Ich würde gerne vorm öffnen der Cookiebox ein leicht durchsichtigen Hintergrund hinzufügen wollen.
$('<div id="dp--cookie-consent-bg"/>').prependTo('body');

Wenn ich den Code im dp--cookie-init Event packe wird das Element erst hinzufügt während sich die Cookiebox schon öffnet was recht unschön aussieht.

document.addEventListener('dp--cookie-init', function (e) {
    $('<div id="dp--cookie-consent-bg"/>').prependTo('body');
});

Die anderen Events treffen soweit verständlich ebenso nicht zu.
Gibt es da eine andere Möglichkeit?

CSS should not be pre-minified

I think it would be better to deliver un-minified CSS, to improve handling when customizing the styles. Especially because TYPO3 brings its own options to minify assets.

How to locate the Buttons below?

Hi there!
Tried your extension the first time in Typo3 7.6.43 and 9.5.18 and I'm happy. ;)

But there are two issues I tried to solve:

  1. How can I locate the buttons (allow / allow all etc.) the user had to click (in german f.e.)?
  2. Is the fingerprint showed after clicking necessary or is it possible to remove it?

It would be great to know. Thank you very much for helping and for this great extension.

Greetings Steff

Custom Checkbox Layout

It is not possible to create an individual layout for checkboxes.
Can I extend the Javascript so that I can use an individual layout?

<label for="dp--cookie-require"> <input type="checkbox" id="dp--cookie-require" class="dp--check-box" disabled="disabled" checked="checked"> <span class="custom-checkbox"></span> </label>

cookie.min.js causes error?

I don't get your extension running in TYPO3 8.7.x. Chrome's console show this error:

Refused to apply style from 'https://www.domain.tld/undefined/' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.

The error appears when cookie.min.js is loaded. If I rename the file (not to load it), the error disappears.
I also compared the source the extension generates with your website (https://dp-dvelop.de/), it's all fine with it, however nothing of the extension shows up in the frontend and the CSS files aren't loaded (cookieconsent.min.css and cookie.min.css). Do you have any idea what the reason could be?

Kind regards :-)

=>It's fine now! I hadn't properly removed the scripts of another cookie consent extension before. That had caused the conflict...

TYPO3 dependency

When i try to install it with v7.6 i get:
Your TYPO3 version is lower than this extension requires. It requires TYPO3 versions 8.7.0 - 9.2.99

All checkboxes allways checked

Hi!
The settings for checked="{settings.checkboxes.statistics} and checked="{settings.checkboxes.marketing} don´t work. Both checkboxes are checked, even the constants are set to "false".

Best,
Christoph

TYPO3 9.6.18
PHP 7.2

Function?

Try to get this to run with an simple example:

page.headerData.45678 = TEXT
page.headerData.45678.value(
    <script data-ignore="1" data-cookieconsent="statistics" type="text/javascript">
        alert("STATISTIC ACCEPTED");
    </script>
)

Result: The Script is fired all the time. Regardless of whether statistic checkbox is true or not.

composer installation fails

When I install this extension via composer req it resolves to a directory named ext/typo3_dp_cookieconsent - which is not resolvable via TS like this EXT:dp_cookieconsent/Resources/Private/Layouts/Cookie.html. Is there something wrong about composer on my end or should this be added to the extensions composer.json that its directory name is without "typo3-" prefix (if there is such configuration available)

How to remove unneccesary checkboxes

How can I remove an unneccesary checkbox like "marketing", if I don't need it?

If I remove the label in the partial, I geht the following errors in the Javascript Console:

"Uncaught TypeError: Cannot set property 'checked' of null"
"Uncaught TypeError: Cannot set property 'id' of null"

Do I have to deactivate the Checkbox anywhere else in Typoscript?

Improve differing themes, so a plain theme is possible

I am currently adjusting the styling to reflect my current Bootstrap styles. Therefor it is obstructive to have hard-coded font styling and colors. I think it would be better to split up CSS functionality (positioning and overlay) from the rest, so one doesn't have to override the whole stylesheet or each unwanted color/font styling.

revokable = false has no effekt

Hi!
The setting plugin.tx_cookieconsent.settings.revokable = false hast no effekt, the "revoke button" still occurs.
Best,
Christoph

Revoke botton not usable with mobile devices

Hi!
The revoke-button is not usable on mobile devices (tested with an Android and iPhone). When tapping an the icon just nothing happens.

TYPO3 9 + 10 (actual versions).

Best,
Christoph

Cannot read property "checked" of null

Error:

Uncaught TypeError: Cannot read property 'checked' of null
    at dp_cookieconsent.js?1581195265:6
    at Array.map (<anonymous>)
    at e.window.addEventListener.e.loadCheckbox (dp_cookieconsent.js?1581195265:6)
    at dp_cookieconsent.js?1581195265:6
    at Array.map (<anonymous>)
    at e.window.addEventListener.e.setCheckboxes (dp_cookieconsent.js?1581195265:6)
    at i.onStatusChange (dp_cookieconsent.js?1581195265:6)
    at i.setStatus (dp_cookieconsent.js?1581195265:6)
    at i.d (dp_cookieconsent.js?1581195265:6)
(anonymous) @ dp_cookieconsent.js?1581195265:6
window.addEventListener.e.loadCheckbox @ dp_cookieconsent.js?1581195265:6
(anonymous) @ dp_cookieconsent.js?1581195265:6
window.addEventListener.e.setCheckboxes @ dp_cookieconsent.js?1581195265:6
onStatusChange @ dp_cookieconsent.js?1581195265:6
i.setStatus @ dp_cookieconsent.js?1581195265:6
d @ dp_cookieconsent.js?1581195265:6
        e.prototype.loadCheckbox = function(e, t, o) {
            var n = this
              , i = "dp--cookie-" + e
              , s = document.getElementById(i);
            return !0 === t ? this.dpCookies && this.dpCookies.hasOwnProperty(i) && (s.checked = this.dpCookies[i]) : void 0 !== o && (s.checked = o),
            n.checkboxes.map((function(t, o) {
                t.name == e && (n.checkboxes[o].checked = s.checked)
            }
            )),
            s
        }

this is because s is null. s seems to be checking if marketing checkbox is available, when its not even in the DOM. Therefore it should check if s is not null prior checking the s.checked contents.

I've disabled the marketing checkbox via the proposed FAQ way.

To make it work, I had to do this in my template:

    <label class="hidden" hidden for="dp--cookie-marketing">
        <f:form.checkbox id="dp--cookie-marketing" class="hidden dp--check-box" checked="{settings.checkboxes.marketing}" value="" />
        <f:translate key="dpMarketing" extensionName="dp_cookieconsent" />
    </label>

This way its in the DOM but is not visible.

Using version 10.4.1

Question: onclick event in description

Hi,

I want to add an onclick event in the message-area (hide the checkboxes and show them when clicking on an link/text/button). But it doesn´t work.
When I add the same onclick event outside the cookiebanner, it works (the checkboxes in the cookiebanner are shown).
Any ideas?

Thanks a lot!
Best,
Christoph

includeJSFooter (dp_cookieconsent.js is not included)

dp_cookieconsent.js might fail to include with given version parameter

affects Configuration > TypoScript > setup.txt
TYPO3 CMS Version 9.5.13
PHP 7.2.23

Solution: Leave away version when including JS in footer

Change
includeJSFooter { dp_cookieconsent = EXT:dp_cookieconsent/Resources/Public/JavaScript/dp_cookieconsent.js?v=10.2.0 }

to proposed:
includeJSFooter { dp_cookieconsent = EXT:dp_cookieconsent/Resources/Public/JavaScript/dp_cookieconsent.js }

BE: wording wrong

Hi!
Great extension!

In the constant editor a small wording issue:

Zwischenablage01

the headline of the second should be "markting" instead of "staticstics"

Best,
Christoph

Edge / IE11 No Cookie Disclaimer

I get the following error in the console from cookie.min.js

Expected (

Line 6269

Tested against Edge and IE11

This why I dont see the cookie disclaimer in those two browser, since the JS is interrupted. Maybe other browsers have this aswell.

CSS property `left` uses 'unset' instead of 'auto'

For styling the revoke button the properties left or right are used.

To unset one of these values e.g. left: unset; is used. left: auto; would be correct.

The usage of the value unset renders the revoke button incorrectly in IE11 (see screenshot).

Usage of left: unset; in IE 11:
grafik

Usage of left: auto; in IE 11:
grafik

TYPO3 6.2 Support

If you would use <f:uri.page pageUid=""/> viewhelper in the template you could support also v 6.2, you are forcing int+ in the constants anyway so <f:uri.typolink arguments=""/> is not imo necessary.

includeJSFooter

How block this url?

includeJSFooter { gmaps = https://maps.googleapis.com/maps/api/js?key=AIz... gmaps.async = 1 }

How to deal with "fe_typo_user"-Cookie from TYPO3 Core ?

How can I handle the "fe_typo_user"-Cookie with this Tool, which is used for frontend user login by TYPO3 itself? As I can see I only can manipulate how local or external JavaSript-Files or -snippets will be included. Is that even possible with this solution?

Combination with external resource & inline js

Could it be that a combination of the both is not possible?

<script type="text/plain" data-cookieconsent="statistics" data-src="https://s3.tradingview.com/external-embedding/embed-widget-tickers.js">
  {
  "symbols": [
    {
      "title": "GOLD (USD)",
      "proName": "XAUUSD"
    }
  ],
  "colorTheme": "dark",
  "locale": "en"
}
</script> 

Checkbox statistics is always checked

Hi,
there is no effect when setting plugin.tx_cookieconsent.settings.statistics = false. The stistics checkbox is always checked. Tried with versions 10.0.0 up to 10.5.2.

Best regards
Alex

Conflicts with Cypress

In Production, it works fine.
For the future I want to build acceptance-Tests with Cypress.
If iI use Cypress, the message-box will not be shown. I thinke there is a conflict between your JavaScript-code and the cypress-runner
I Use TYPO3 9.5.22 and your version "version": "10.6.1" (Composer.lock)

Have you a solution for that?
Is there a chance, to get an un-compressed javascript-code, soi can check the problem myself?
Dieter

Cookies not deleted after disallowing cookies

Thanks for this nice extension, i really like it!

In my testing i have found an issue. I have enabled checkboxes for the cookie banner. If I first allow all cookies all cookies are set, but if i disallow marketing and analytics cookies afterwards, the cookies are still there. Should the cookies not be deleted after i change this setting?

Test Setup:

Typo3 Version: 8.7.27
PHP Version: 7.2
Operating System: Debian 9
Extension Version: 9.5.6

Incompatible with TYPO3 8.7.x?

I've installed the newest version of dp_cookieconsent from TER in a couple of systems running 8.7.x. The cookie banner won't show up with the provided example Typoscript here on github. Do I fail to notice some necessary settings, or is there an issue?

wrong typoscript in FLUIDTEMPLATE

embedding FLUIDTEMPLATE with this code is wrong:

lib.dp_cookieconsent {
    file = EXT:dp_cookieconsent/Resources/Private/Layouts/Cookie.html

    templateRootPaths < plugin.dp_cookieconsent.view.templateRootPaths
    -- snip ---
}

using "file =" is deprecated and makes it nearly impossible to move the templates in an own site extension. Solution is to alter "file" to "templateName":

lib.dp_cookieconsent {
    templateName = Cookie

    templateRootPaths < plugin.dp_cookieconsent.view.templateRootPaths
    -- snip ---
}

this will work.

disable auto open cookie popup on loading

The cookie consent library has an option called autoOpen. It would be nice to be able to configure it in the extension.
If you have the cookie popup as an overlay for the entire site, you want to disable it on your privacy page. Even if you have some kind of init process on your site and want to activate the popup yourself.

Revoke button as text link?

I would like to call the revoke function by using a text link (or button) in the footer instead of the revoke button (which overlays with the "To top arrow" on my website).

I mean something like:
<a href="#" title="Cookie settings" onclick="FunctionName();return false;">Cookie settings</a>

How would the correct syntax be? And will it work when the revoke function is disabled by using
plugin.tx_cookieconsent.settings.revokable = false

By the way:
plugin.tx_cookieconsent.settings.revokable = false
doesn't work for me (dp_cookieconsent 10.3.0, TYPO3 8.7.30), although it should work (#9)? The revoke button does not disappear.

Kind regards and thanks for your extension. The documentation and compatibility with so many TYPO3 versions is great :-)

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.