Can Posted April 18, 2016 Author Share Posted April 18, 2016 Just lost my text due to wrong shortcut -.- (maybe auto storing in local storage would be nice ) but anyways.. Now I got you maba. Thanks to you I just notices that my pages weren't working too.. I actually don't really now what fixed the issue and maybe just re-installing could fix it but there is a new Version with some changes you could grab during re-installation process..see changelog in readme for detail Make sure to remember your settings before uninstalling! Please let me know if everything works now. Sorry Manfred for the late response and thank you for the translation! 'notes' => sprintf(__("For example Font Awesome checkmark icon e.g. %s\n(You need to include Font Awesome on your own)"), "<i class='fa fa-check'></i>"), I just stripped the \n for now Maybe don't use the \n? Or delete part of string "(You need to include Font Awesome on your own)", because Font Awesome is already included in PW. But it won't be included on your front pages templates so it works only in backend. You can of course reference the version used by PW but you have to do it yourself (or am I missing something?) 'notes' => __("Default true\nIt has been suggested that this setting can effectively help to reduce identity theft through XSS attacks"), Moved "Default true" to end of former line.. I have no idea why \n is not working I always used it as it's suggested in the docs and as far as I remember it always worked?! EDIT: 0.1.2 adds minified CSS & JS 1 Link to comment Share on other sites More sharing options...
maba Posted April 18, 2016 Share Posted April 18, 2016 Now it works! Thanks 1 Link to comment Share on other sites More sharing options...
Can Posted April 18, 2016 Author Share Posted April 18, 2016 great Link to comment Share on other sites More sharing options...
Flavia Pellegrini Posted June 15, 2016 Share Posted June 15, 2016 Hi everyone!I installed the plugin, but even if I accept cookies, everytime I refresh the page the cookies bar appears again.How can I solve it? Link to comment Share on other sites More sharing options...
Flavia Pellegrini Posted June 15, 2016 Share Posted June 15, 2016 Don't worry! I tried to uninstall and install again the plugin, and now it works!Thanks anyway! Link to comment Share on other sites More sharing options...
Can Posted June 15, 2016 Author Share Posted June 15, 2016 Welcome to the forums Flavia Glad you could solve it Link to comment Share on other sites More sharing options...
kixe Posted July 30, 2016 Share Posted July 30, 2016 Hi Can, thank you for this great module. Would be great to have the 'policy link text' in multilanguage too. Link to comment Share on other sites More sharing options...
Can Posted July 30, 2016 Author Share Posted July 30, 2016 Wow finally I can answer internet is quite slow at the moment and the new PW forums seem to be a little hungrier or dependent to load fully for the reply form to work/load so I can read but answering is a hard task for me..and here's now link anymore pointing to a stand alone reply form (which could maybe be more lightweight, I don't know..) anyway..now it works So as @kixe requested the policy link text is now translatable, too. I'm not sure but I think till now the translations weren't reflected in the cookie notification at all, or maybe I confused myself and missed something don't know.. Anyway now it works (at least for me). Don't know if this is the proper way of coding this and I'm open to suggestions, maybe there's a PW way in doing this? And as I'm a little more gitty now (working more with git, just found out what gitty actually means haha^^) I included a devns branch now..maybe it's a little confusing? (just now came the idea to call the branch namespaced or something) as it's not the development version of MarkupCookieConsent but the namespaced version meant to be used with PW 3.x devns. So the only difference is added namespace in the module and the config file and module info now reflects the need for PW >= 3 to install the devns branch 2 Link to comment Share on other sites More sharing options...
csaeum Posted August 2, 2016 Share Posted August 2, 2016 Hello I have currently integrated into the template cookieconsent manually.In search of "maybe what better" I saw that yes there CookieConsent as a module.Now I have it installed in my PW 2.7.3 and got this error Error: Call to a member function isDefault() on null (line 78 of /home/wsc/web/bernhard.web-seo-consulting.eu/public_html/site/modules/MarkupCookieConsent/MarkupCookieConsent.module) This error message was shown because you are logged in as a Superuser. Error has been logged. Is this due to the integrated or has other reasons in the template? Link to comment Share on other sites More sharing options...
flydev Posted August 2, 2016 Share Posted August 2, 2016 2 hours ago, csaeum said: Is this due to the integrated or has other reasons in the template? @csaeumIf you install ProcessWire multi-language support, it should work @Can maybe this small check could help, on line 78/79 if($this->wire('modules')->isInstalled('ProcessLanguage')) { $userLanguage = $this->wire('user')->language; $lang = $userLanguage->isDefault() ? '' : "__$userLanguage->id"; } else { $lang = ''; } 2 Link to comment Share on other sites More sharing options...
Can Posted August 2, 2016 Author Share Posted August 2, 2016 good catch @flydev never considered this as most of my projects are multi lang tested and pushed your fix, should work now @csaeum Please let me now if it works for you, too EDIT: Just bumped version so you should be able to just update the module using ProcessWireUpgrade module (if installed) 4 Link to comment Share on other sites More sharing options...
csaeum Posted August 2, 2016 Share Posted August 2, 2016 Ok sorry folks I have not even checked earlierThanks, that's it. Perhaps we should intercept it and then write down) Link to comment Share on other sites More sharing options...
tpr Posted August 2, 2016 Share Posted August 2, 2016 Checking for wire('languages') wouldn't work? I use this and seem to do the trick. 1 Link to comment Share on other sites More sharing options...
Can Posted August 2, 2016 Author Share Posted August 2, 2016 2 minutes ago, tpr said: Checking for wire('languages') wouldn't work? I use this and seem to do the trick. @tpr sure would work, too. Maybe faster? Otherwise shouldn't matter?! 1 Link to comment Share on other sites More sharing options...
tpr Posted August 2, 2016 Share Posted August 2, 2016 No idea, but it's shorter so leaves more space in my head for others 2 Link to comment Share on other sites More sharing options...
Can Posted August 4, 2016 Author Share Posted August 4, 2016 @tpr https://github.com/CanRau/MarkupCookieConsent/commit/3f7b71a659759693ae5dcdeb7436887a5a2c97f4 3 Link to comment Share on other sites More sharing options...
tpr Posted August 4, 2016 Share Posted August 4, 2016 Definitely better! 2 Link to comment Share on other sites More sharing options...
Can Posted August 14, 2016 Author Share Posted August 14, 2016 For everyone interested in disabling cookies at all to avoid every possible need for this plugin checkout out this blog post from Ryan http://processwire.com/blog/posts/multi-instance-pw3/#more-session-control 1 Link to comment Share on other sites More sharing options...
kixe Posted October 8, 2016 Share Posted October 8, 2016 (edited) On 14.8.2016 at 5:34 PM, Can said: For everyone interested in disabling cookies at all to avoid every possible need for this plugin checkout out this blog post from Ryan http://processwire.com/blog/posts/multi-instance-pw3/#more-session-control @Can Good to point this out. But already with a simple contactform you need cookies. I stay with your module as default. Edit: I ended up with a combination. Added the following code to my config.php /** * if we would use cookies only for the admin area * */ $config->sessionAllow = function($session) { // if URL is an admin URL, allow session if(strpos($_SERVER['REQUEST_URI'], $session->config->urls->admin) === 0) return true; // if there is a session cookie, a session is likely already in use so keep it going if($session->hasCookie()) return true; // user accepted cookies due to EU law (Module MarkupCookieConsent) if(!empty($_COOKIE['eu-cookie'])) return true; // otherwise disallow session return false; }; Small request: I would like to set a more specific target to the privacy policy page including an url fragment string like /privacy-policy/#cookies Would be nice to have an inputfield to add this to the url of the target page. Actually don't need this now but having an option to define an external page would be nice too. I don't really get the usage of Link Target -> Custom Selector Is it just to get the target frame by name according to the html attribute, or is it a kind of PW selector? Edited October 11, 2016 by kixe 1 Link to comment Share on other sites More sharing options...
Can Posted October 11, 2016 Author Share Posted October 11, 2016 On 8.10.2016 at 6:20 AM, kixe said: But already with a simple contactform you need cookies. to use session based messages or what am I missing? no it's no pw selector, maybe I'll change wording? it enables you to provide a custom link target (useful at all) just pushed 0.1.6 with custom privacy page url 3 Link to comment Share on other sites More sharing options...
kixe Posted October 13, 2016 Share Posted October 13, 2016 Thanks for the quick implementation. Again 2 small remarks.1. Cookie Expire The field description and the behaviour of the property 'cookieExpire' doesn't match. I got this after install: You should either change the description to something like 'Cookie expire date (Unix Timestamp)' or add time() later and not directly to the property like: setcookie($this->cookieName, 1, time() + $this->cookieExpire, $this->cookiePath, $this->cookieDomain, $this->cookieSSL, $this->cookieHttp); 2. About Version Numbering Your last version was: 0.1.51 Your update version is 0.1.6. PW detects an older version in this case and ask if I want to overwrite the newer module version by an older one. PW handles only 2 subversion levels. A version number like 0.1.5.1 is not possible in PW. So your new version number should be 0.1.52 or 0.2.0. It doesn't really hurt. Just to know ... 1 Link to comment Share on other sites More sharing options...
Can Posted October 13, 2016 Author Share Posted October 13, 2016 good to know about versioning thank you! and the expiration I'll check a little later thanks for spotting this.. 2 Link to comment Share on other sites More sharing options...
netcarver Posted October 13, 2016 Share Posted October 13, 2016 If you use a string for your module version parameter, you can have more than the three fields. For example... ...and the code... Not sure if this plays well with version checking - but it is possible. 2 Link to comment Share on other sites More sharing options...
Can Posted October 15, 2016 Author Share Posted October 15, 2016 good catch @netcarver I think the thing is that I always forget that 0.1.51 is greater than 0.1.6 thinking about it I'll totally get it the first is fiftyone not 5.1 but a little distracted and I mix those things up..class, plugins, versioning are still kind of new..especially versioning as I never took it seriously coding for myself not bound to any automatic update process or other people involved @kixe fixed expiration and version issues On 8.10.2016 at 6:20 AM, kixe said: But already with a simple contactform you need cookies Because I'm curious I have to ask again..what exactly do you mean by this? For convenience (e.g. to use session based messages)? By law? Another general question..do those two branches master and devns make sense? Not that it's a big hassle to maintain, but again because I'm curious Saludos Link to comment Share on other sites More sharing options...
kixe Posted November 2, 2016 Share Posted November 2, 2016 On 15.10.2016 at 4:46 AM, Can said: Because I'm curious I have to ask again..what exactly do you mean by this? For convenience (e.g. to use session based messages)? By law? Nothing special. Just to use session based message. Again something to complain about. Sorry for this Good to have the option to limit the cookie consent to a special path/ tree. But in this case the banner shouldn't be shown for pages not residing under this tree. It would also be nice to store the page id and not the path, to stay multilanguage compatible and to avoid problems if the page name has been changed. A page-field (instead of text) would be the simplest solution here. 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now