Kipjr / cookieconsent

Simple cookie consent for Piwigo
https://piwigo.org/ext/extension_view.php?eid=888
3 stars 3 forks source link

Remember consent past the session? #6

Closed ghost closed 3 years ago

ghost commented 3 years ago

I'm not sure if this is a bug or expected behaviour. It seems that the user's consent is only remembered for a single session and that each new session you have to give consent again.

This seems different from most other sites where the cookie setting is remembered for quite some time.

Is there an easy way to change this?

Kipjr commented 3 years ago

This can be done, however I would need to rewrite a core-piece of my code. Specifically, I need to remove the cookieconsent value from the server session database and I would need to create an independent cookie.

Kipjr commented 3 years ago

Fixed with b9a33cef4819da7e80a5111f8221f6ca48fbed50 Has been tested. Please give feedback on the result. @tomunder

ghost commented 3 years ago

So, I deleted the regular version of the plugin and ftp'd this one to my plugins directory. When I try to activate it, I get this:

Fatal error: Uncaught Error: Class 'cookieconsent-master_maintain' not found in /home/~~~/admin/include/plugins.class.php:81 Stack trace: #0 /home/~~~/admin/include/plugins.class.php(113): plugins::build_maintain_class('cookieconsent-m...') #1 /home/~~~/admin/plugins_installed.php(58): plugins->perform_action('activate', 'cookieconsent-m...') #2 /home/~~~/admin/plugins.php(31): include('/home/media_xqh...') #3 /home/~~~/admin.php(309): include('/home/media_xqh...') #4 {main} thrown in /home/~~~/admin/include/plugins.class.php on line 81

I think it is just a problem with how I installed it. Is there a proper way to install this test version? I haven't done testing for a plugin before.

Ainz commented 3 years ago

Maybe temporarily removing the previous version might solve that

ghost commented 3 years ago

Maybe temporarily removing the previous version might solve that

That's actually what I did. I removed the previous version. It wasn't showing in the plugin directory on the server, and it wasn't in the list of active or inactive plugins in the dashboard. Then I ftp'd the extracted folder to the server. Should I have left the original version installed and just replaced the files in the calendar directory?

Kipjr commented 3 years ago

You can also update it using the Plugin Manager, right?

Kipjr commented 3 years ago

Please keep in mind that Piwigo stores information about your plugin in its database

ghost commented 3 years ago

Please keep in mind that Piwigo stores information about your plugin in its database Oh. I thought that might be the case. You can also update it using the Plugin Manager, right? Sorry, I'm very new at this. I'm more familiar with Wordpress where there is an option to upload the plugin file through the backend web admin. But I don't see how to use the plugin manager in Piwigo to install a plugin not in the public library.

I'm afraid I may not be the best one to do testing for this. :-( I don't want to take up your time helping me figure out what I'm doing wrong.

Kipjr commented 3 years ago

I don't mind. I will test it nevertheless ;)

Edit. I deactivated and removed the installed version and downloaded the new one from the Piwigo Plugin page. I see no issues here. What version of Piwigo are you using?

Ainz commented 3 years ago

Just got the update, what can I test? (This is Homdax on the forums btw :) )

Ainz commented 3 years ago

We have a problem. the new update empties the "SUBMIT" field for the button where you accept the cookies. Failure to insert some kind of text in that will render the control invisible/useless and effectively block the site...if you have FULLSCREEN at the same time....

image

Kipjr commented 3 years ago

I cannot reproduce this. However I've built in a failsafe when this happens. It will show Accept when the variable is unset or empty 58901c5

Ainz commented 3 years ago

should be ok then... yeah, worked withoput issues on another site...