Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on June 02, 2018, 07:23:16 PM

Title: GDPR Helper
Post by: vbgamer45 on June 02, 2018, 07:23:16 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4183)

GDPR Helper For SMF 2.1.x (MySQL) and SMF 2.0.x (MySQL) , SMF 1.1.x

Warning does not guarantee GDPR compliance. No warranty provided.

Please backup your Privacy Policy text before upgrading to a newer version, otherwise your customized version will be lost.

Note: When upgrading to 2.0.16 or SMF 2.1 RC3 best way to carry over the GDPR information is to uninstall the old version of GDPR Helper then install newest version of GDPR Helper.
Next, uninstall GDPR Helper, then install SMF 2.0.16 or SMF 2.1 RC3



Includes:
Allows member to export their data. Their profile and post information
On member deletion clears IP address and email from posts and assigns a new username to all old posts.
Includes a privacy policy page, adds link in the footer and adds a section for consent on registration
Stores the date/time that the privacy policy was changed and option to force to reagree
Stores the date/time that the registration agreement was changed and option to force to reagree

We also have GDPR Pro which offers other features and we do listen to feedback for requests.
More information: https://www.smfhacks.com/gdprpro.php

Title: Re: GDPR Helper
Post by: HDB on June 03, 2018, 06:13:05 PM
I started out using GDPR Helper a few weeks ago and I just installed today the new GDPR Pro paid version.

Both versions work flawlessly. Thanks vbgamer45!
Title: Re: GDPR Helper
Post by: Crashingmail on June 08, 2018, 06:18:03 AM
I really like this Mod, but i am missing a way to create Policy Agreements for different languages.
Title: Re: GDPR Helper
Post by: @rjen on June 08, 2018, 07:31:01 AM
Quote from: Crashingmail on June 08, 2018, 06:18:03 AM
I really like this Mod, but i am missing a way to create Policy Agreements for different languages.

then you will have to pay for the Pro version I guess..

Or you can wait for the official SMF solution (which is what I will do)
Title: Re: GDPR Helper
Post by: vbgamer45 on June 08, 2018, 08:26:00 AM
Quote from: Crashingmail on June 08, 2018, 06:18:03 AM
I really like this Mod, but i am missing a way to create Policy Agreements for different languages.
Yes it is part of the pro version of the mod. It detects the language of the user then loads the correct policy https://www.smfhacks.com/gdprpro.php
Title: Re: GDPR Helper
Post by: Crashingmail on June 08, 2018, 03:27:58 PM
Okay thanks for the information, but honestly around 30€ is a bit to much for a simple mod.
Title: Re: GDPR Helper
Post by: Obcy on June 16, 2018, 05:55:36 PM

512: loadMemberContext(): member id 5386 not previously loaded by loadMemberData()
Filtruj wyniki: Pokazuj tylko błędy z tego pliku
Plik: /usr/home/obcy/domains/fobicy.pl/public_html/Sources/Load.php
Linia: 1138


many errors, after installing gpdr
Title: Re: GDPR Helper
Post by: vbgamer45 on June 16, 2018, 05:59:25 PM
Does it go away if you uninstall?

I do not use loadMemberContext in this mod...
Title: Re: GDPR Helper
Post by: Obcy on June 17, 2018, 07:29:57 AM
If you uninstalled all right.
Reproduce error:
- register user
- create post
- uncheck option in gpdr helper "Clear Member IP/Email,Username from posts on member delete"
- delete user
- view this post
- check error log
Title: Re: GDPR Helper
Post by: vbgamer45 on June 17, 2018, 07:54:39 AM
That sound like another mod issue. if you uncheck that option gdpr helper won't do anything. It sounds like you have another mod that is checking if the user is deleted.
Title: Re: GDPR Helper
Post by: Obcy on June 17, 2018, 07:59:45 AM
Tested only "gpdr helped" installed in tested forum. Error exist.
Title: Re: GDPR Helper
Post by: Arantor on June 17, 2018, 08:04:32 AM
Means that the id_member isn't being properly cleared from the messages table on deletion.
Title: Re: GDPR Helper
Post by: vbgamer45 on June 17, 2018, 08:09:55 AM
Oby do you have this checked or not "Clear Member IP/Email,Username from posts on member delete" 
Arantor thanks for the hint.
Title: Re: GDPR Helper
Post by: Arantor on June 17, 2018, 08:13:14 AM
It should be removed if the row is removed from smf_members regardless of anything else because what's happening is that the id is listed there, so loadMemberData tries to load it and silently fails, and then loadMemberContext gets upset because an id it thought should exist doesn't exist.

Though the usual delete members routine does other stuff like ensuring the poster_name field is updated for all posts.
Title: Re: GDPR Helper
Post by: vbgamer45 on June 17, 2018, 08:16:13 AM
Was wondering that though. Because SMF normally doesn't remove the member id from that table so why is it an issue now? I have seen this occur with my other mods when users get deleted if not checking if if the member was deleted.

The useful part of it is to reattribute posts if a member comes back at some point.
Title: Re: GDPR Helper
Post by: Arantor on June 17, 2018, 08:17:29 AM
It should be removing it...

The reattribution feature doesn't use ids either, it uses email address which is embedded into every post (and can be edited by admins before reattribution too)
Title: Re: GDPR Helper
Post by: Obcy on June 17, 2018, 08:25:18 AM
Quote from: vbgamer45 on June 17, 2018, 08:09:55 AM
Oby do you have this checked or not "Clear Member IP/Email,Username from posts on member delete" 
Arantor thanks for the hint.
If checked this option.
-deleted user(the login deleted users changes)
- no errors in log
Title: Re: GDPR Helper
Post by: vbgamer45 on June 17, 2018, 08:30:03 AM
Hmm, then I am not sure what is causing this users issue. It checked my database and id_member is set to 0. And the code that I changed does the same when the member is deleted.  Unless it is a cache issue.
Title: Re: GDPR Helper
Post by: Arantor on June 17, 2018, 08:43:44 AM
So if the option is unchecked, are the ids still cleared out? Because if not, that would be the cause of the problem.
Title: Re: GDPR Helper
Post by: vbgamer45 on June 17, 2018, 08:57:36 AM
Yes the id's are cleared out either way...

// Start GPDR Helper
if (empty($modSettings['gpdr_allow_export_userdata']))
{
// Make these peoples' posts guest posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:guest_id}, poster_email = {string:blank_email}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'blank_email' => '',
'users' => $users,
)
);
}
else
{
global $sourcedir;

require_once($sourcedir . '/gpdr2.php');
GPDR_CleanMemberInfo($users);
}

// END GPDR Helper
Title: Re: GDPR Helper
Post by: Obcy on June 17, 2018, 09:28:57 AM
Not clear id_member in messages if gpdr helper installed.(option unchecked "Clear Member IP/Email,Username from posts on member delete") if deleted user. 
Title: Re: GDPR Helper
Post by: ms_ukyankee on June 30, 2018, 09:04:53 AM
Hiya, thanks for this mod, it was a great timesaver.

I have one issue which confuses me, the Privacy Policy link in the footer is duplicated on my forums on both custom themes (old/new) and Curve. No one else seems to have this as it's not reported. I can work around it and add my own policy link while commenting out the mod code from QueryString.php, but is it the mod or something else? it's the "something else" which concerns me.
Title: Re: GDPR Helper
Post by: vbgamer45 on June 30, 2018, 09:54:55 AM
Probably something else such as part of the code being executed twice.
Title: Re: GDPR Helper
Post by: Shambles on June 30, 2018, 01:08:35 PM
Quote from: ms_ukyankee
... the Privacy Policy link in the footer is duplicated on my forums ...

Have a look in Subs.php and see if you have this:

// Start up the session URL fixer.
ob_start('ob_sessrewrite'); ob_start('ob_sessrewrite');


If so, change it to this:

Code (Replace) Select
// Start up the session URL fixer.
ob_start('ob_sessrewrite');
Title: Re: GDPR Helper
Post by: ms_ukyankee on June 30, 2018, 02:43:57 PM
Quote from: Shambles on June 30, 2018, 01:08:35 PM

Have a look in Subs.php and see if you have this:

// Start up the session URL fixer.
ob_start('ob_sessrewrite'); ob_start('ob_sessrewrite');


If so, change it to this:

Code (Replace) Select
// Start up the session URL fixer.
ob_start('ob_sessrewrite');


How bizarre, that was it! Fixed. Thank you, Shambles!
Title: Re: GDPR Helper
Post by: vbgamer45 on June 30, 2018, 02:48:58 PM
Good to know haven't seen that occur before.
Title: Re: GDPR Helper
Post by: Shambles on June 30, 2018, 03:26:25 PM
Quote from: vbgamer45
Good to know haven't seen that occur before.

https://www.simplemachines.org/community/index.php?topic=559841.msg3974559#msg3974559   ;)
Title: Re: GDPR Helper
Post by: vbgamer45 on June 30, 2018, 03:52:45 PM
Strange not sure what mod is doing that I do not touch that line of code in this mod.
Title: Re: GDPR Helper
Post by: @rjen on July 02, 2018, 03:41:10 AM
Quick question.

I am checking the acceptance of the privacy agreement using a query on the database, combining the 'gpdr_policydate' and the last login date. In a month or so we will delete all users that have not accepted.

I find that some users have a last login date LATER than the date the the policy was effected, but they do not have a value in de gpdr_policydate. This suggests that they logged in to the forum after the effective date, so they must have been presented with the agreement text...

Is this what happens when they login, but do NOT accept the policy? Or is is a glitch in the code somehow?
Title: Re: GDPR Helper
Post by: vbgamer45 on July 02, 2018, 08:38:52 AM
Yes, the  gpdr_policydate is only set if they agree to the new privacy policy. People can login and logout without accepting.
Title: Re: GDPR Helper
Post by: @rjen on July 02, 2018, 10:16:39 AM
Ok, thanks
Title: Re: GDPR Helper
Post by: Shambles on July 04, 2018, 11:53:51 AM
Quote from: vbgamer45 on June 30, 2018, 03:52:45 PM
Strange not sure what mod is doing that I do not touch that line of code in this mod.

I think it's the Login Form Fix mod (https://custom.simplemachines.org/mods/index.php?action=parse)


See here
https://www.simplemachines.org/community/index.php?topic=558180.msg3979010#msg3979010
Title: Re: GDPR Helper
Post by: confuseamuse on July 04, 2018, 12:15:05 PM
I remember asking for a mod that let you change the registration agreement and force users to view the changes. Thankfully, the GDPR requirement essentially provided the functionality I'll need ;D
Title: Re: GDPR Helper
Post by: vbgamer45 on July 04, 2018, 12:18:56 PM
confuseamuse That works out! Thanks Shambles for figuring that out looks like that will be fixed soon.
Title: Re: GDPR Helper
Post by: Arantor on July 04, 2018, 12:21:32 PM
Yeah, it's an easy fix, I just was a bit sloppy in my packaging, because I haven't written SMF mods in a while...
Title: Re: GDPR Helper
Post by: vbgamer45 on July 04, 2018, 12:46:56 PM
Thanks I have done that a bunch of times over the years.
Title: Re: GDPR Helper
Post by: Arantor on July 04, 2018, 01:58:56 PM
And it's fixed now :)
Title: Re: GDPR Helper
Post by: AllMassive on July 20, 2018, 05:37:34 PM
When trying to export i get this in the error-logs:

https://forum.xxx.com/index.php?pretty;action=profile&area=exportdata;u=5
8: Undefined index: profile_fields
Datei: /var/www/forum/SearchFocus.german-utf8.php (edit_options sub template - eval?)
Zeile: 1212

I'm using the 1.04. on 2.0.15.
Title: Re: GDPR Helper
Post by: vbgamer45 on July 20, 2018, 06:07:24 PM
Which SMF version?
Title: Re: GDPR Helper
Post by: AllMassive on July 20, 2018, 06:36:16 PM
Quote from: AllMassive on July 20, 2018, 05:37:34 PM
...  on 2.0.15.
Title: Re: GDPR Helper
Post by: AllMassive on July 24, 2018, 05:38:25 PM
Could you confirm this ?
Title: Re: GDPR Helper
Post by: vbgamer45 on July 24, 2018, 06:39:42 PM
Haven't seen it occur yet on my end.
Title: Re: GDPR Helper
Post by: AllMassive on July 26, 2018, 08:06:34 PM
Perhaps its because i installed other  'member-modules':
Gamer IDs (https://custom.simplemachines.org/mods/index.php?mod=2769)
Google Member Map (https://custom.simplemachines.org/mods/index.php?mod=4128) - but in version 2.0.10
Title: Re: GDPR Helper
Post by: Yikesfactor on October 14, 2018, 01:56:29 AM
Bug:

When the name is changed on all posts, it no longer points to a member profile.

This means the ignore list no longer hides the posts, the new name does not show up on memberlists, and cannot be searched for, even by admins.

The result is posts no in the limbo zone, which cannot be found except by scrolling every thread on the forum.

IMO, the username should be changed, the password wiped, the IP wiped, but the member profile should remain. Ignore lists with the original name on it, need to have the name changed to its new one. OR, all such members deleted, have the posts reassigned to an active member name designed to be an all collect guest-### name.

Posts which are out of the system, but still showing, are nothing but potential trouble.
Title: Re: GDPR Helper
Post by: Aleksi "Lex" Kilpinen on October 14, 2018, 02:53:16 AM
Not a bug, what the mod does is remove personal information - what you are trying to do is create a new identity instead of one that had to be deleted, so in view of GDPR you would potentially create new problems, by fixing one you think is there. They are not "out of the system" they are just shown as guest posts.
Title: Re: GDPR Helper
Post by: Kindred on October 14, 2018, 08:11:52 AM
Also, ignore lists do not ever ignore based on name (because name can be changed at will, by the member)
Ignore lists are based on memberID...    if the account is deleted, there is no more memberID, therefore, the messages will no longer be flagged as ignore.


So... not a bug in the GDPR mod. Not a bug in the SMF code...   it's how the systems works.
Title: Re: GDPR Helper
Post by: Arantor on October 14, 2018, 08:17:19 AM
Especially as leaving the user id in place would still count as having an identifier and so not really allowed.
Title: Re: GDPR Helper
Post by: rawonam on January 17, 2019, 10:45:06 AM
Hi! This looks like a bug to me:

Subs-Members.php
// Start GPDR Helper
if (empty($modSettings['gpdr_allow_export_userdata']))
{
// Make these peoples' posts guest posts.


The setting name is wrong, should be gpdr_clear_memberinfo.
Title: Re: GDPR Helper
Post by: vbgamer45 on January 17, 2019, 11:22:44 AM
Thanks

Update requires uninstall of old version and install of new version

1.0.5
!Fixed incorrect setting used for clearing post information on member deletion
Title: Re: GDPR Helper
Post by: john11smith on February 02, 2019, 05:15:54 AM
Forum version: SMF 2.1 Beta 3 I'm getting an error:
"The package you are trying to download or install is either corrupt or not compatible with this version of SMF."
How to fix it? Is it really required? Users have to agree with conditions before registration.
Title: Re: GDPR Helper
Post by: Arantor on February 02, 2019, 07:13:00 AM
This mod does not support SMF 2.1.
Title: Re: GDPR Helper
Post by: Kindred on February 02, 2019, 08:31:48 AM
which is because 2.1 has GDPR functionality already built in

(but not beta3. The RC1 release will be the first official release with it)
Title: Re: GDPR Helper
Post by: vbgamer45 on March 03, 2019, 08:11:47 PM
1.0.5a
+Added support for SMF 2.1 RC1
Title: Re: GDPR Helper
Post by: Massl on March 04, 2019, 09:48:02 AM
Thanks vbgamer45
With 2.1 RC1 I have this error when I try to export user data.

Database Error
Unknown column 'gender' in 'field list'
File: /home/public_html/smf/Sources/gpdr2.php
Line: 374

My forum has been converted from mybb who does not use gender.

I'm using 1.0.5a but "Your Version: 1.0.4 Latest Version: 1.0.4"
Title: Re: GDPR Helper
Post by: Kindred on March 04, 2019, 10:38:48 AM
VB---    do note that Gender was moved out of the user table and made into a custom profile field in 2.1
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 11:33:37 AM
Update 1.0.5b
!Fixed export data for SMF 2.1.x due to  gender column changed.
!Fixed version number display
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 11:49:51 AM
I just installed this on my site, thank you btw. When I go to the spot in the profile to export data it gives an error.
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 11:51:19 AM
SMF 2.1?
By the type of error can you click the table icon and post the stack
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 11:56:37 AM
2.1 yes....you mean the backtrace, yes hold on.
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 11:57:54 AM
Here ya go.
Title: Re: GDPR Helper
Post by: Hero2019 on March 04, 2019, 12:31:41 PM
I have no errors when exporting.
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 12:35:12 PM
Are you on 2.1 RC1 ??
Title: Re: GDPR Helper
Post by: Hero2019 on March 04, 2019, 12:42:00 PM
Oh right. Sorry my mistake. Yes, I also have RC1.
Have synonymous in the logs the error like you.
Title: Re: GDPR Helper
Post by: lurkalot on March 04, 2019, 12:44:26 PM
Quote from: Kindred on February 02, 2019, 08:31:48 AM
which is because 2.1 has GDPR functionality already built in

(but not beta3. The RC1 release will be the first official release with it)

Did this actually make it to RC1 in the end? I don't see it.  :(
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 12:52:34 PM
The mod was just updated for RC1
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 01:33:26 PM
Quote from: lurkalot on March 04, 2019, 12:44:26 PM


Did this actually make it to RC1 in the end? I don't see it.  :(
I didn't see it either kind of late to add it now...That's why I updated the mod.
Title: Re: GDPR Helper
Post by: Hatshepsut on March 04, 2019, 02:16:36 PM
In my forum, I get error message too, when I click on "Export user data" button in my profile:

Click => (https://i.postimg.cc/bdYtpXBf/GDPR.jpg) (https://postimg.cc/bdYtpXBf)

array(5) { [0]=> array(3) { ["file"]=> string(49) "/home/bulataka/public_html/BNF/Sources/Errors.php" ["line"]=> int(290) ["function"]=> string(9) "log_error" } [1]=> array(3) { ["file"]=> string(66) "/home/bulataka/public_html/BNF/Themes/default/Profile.template.php" ["line"]=> int(1480) ["function"]=> string(17) "smf_error_handler" } [2]=> array(3) { ["file"]=> string(47) "/home/bulataka/public_html/BNF/Sources/Load.php" ["line"]=> int(2502) ["function"]=> string(21) "template_edit_options" } [3]=> array(3) { ["file"]=> string(47) "/home/bulataka/public_html/BNF/Sources/Subs.php" ["line"]=> int(3291) ["function"]=> string(15) "loadSubTemplate" } [4]=> array(3) { ["file"]=> string(40) "/home/bulataka/public_html/BNF/index.php" ["line"]=> int(154) ["function"]=> string(6) "obExit" } } Error loop.

I have edited "Gender" custom field with that input mask:

<img src="https://bg-nacionalisti.org/BNF/images/{INPUT}.gif" alt="{INPUT}" /> {INPUT}
(INPUT options are Male, Female, and None)
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 03:05:55 PM
Fixed the error log issue for profile_fields error
Title: Re: GDPR Helper
Post by: Hero2019 on March 04, 2019, 03:30:16 PM
With me this message comes

Your Version: 1.0.5b Latest Version: 1.0.5 Your GDPR Helper version is not up to date!


But I have the latest version installed.
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 03:34:46 PM
Fixed
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 03:56:37 PM
All of it is fixed....that was fast. So uninstall than reinstall I take it.
Title: Re: GDPR Helper
Post by: Hero2019 on March 04, 2019, 03:57:06 PM
Many thanks.
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 04:04:00 PM
Quote from: Bigguy on March 04, 2019, 03:56:37 PM
All of it is fixed....that was fast. So uninstall than reinstall I take it.
Yes that's it
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 04:25:10 PM
No errors now. Great job sir. ;)
Title: Re: GDPR Helper
Post by: vbgamer45 on March 04, 2019, 04:26:42 PM
Glad to help.
Title: Re: GDPR Helper
Post by: Hatshepsut on March 04, 2019, 11:30:27 PM
Yes, the problems are fixed. Thanks :)
Title: Re: GDPR Helper
Post by: Bigguy on March 04, 2019, 11:52:06 PM
Quote from: lurkalot on March 04, 2019, 12:44:26 PM
Quote from: Kindred on February 02, 2019, 08:31:48 AM
which is because 2.1 has GDPR functionality already built in

(but not beta3. The RC1 release will be the first official release with it)

Did this actually make it to RC1 in the end? I don't see it.  :(

If I am not mistaken this has been moved back to RC3
Title: Re: GDPR Helper
Post by: landyvlad on March 05, 2019, 12:26:48 AM

GDPR
Helper

Quote
Unknown column 'gender' in 'field list'
File: /home/public_html/smf/Sources/gpdr2.php
Line: 374

haha weird. Someone had typo issues that day !  :laugh:
Title: Re: GDPR Helper
Post by: vbgamer45 on March 05, 2019, 12:31:09 AM
Yeah I misspelled it all lol a while back.
Title: Re: GDPR Helper
Post by: Hero2019 on March 08, 2019, 03:44:08 AM
Is that so intentional or a mistake?

Whenever you change the style you have to accept the privacy policy again.

This can be very annoying for the user over time.
Title: Re: GDPR Helper
Post by: Arantor on March 08, 2019, 05:37:59 AM
Change the style, presumably in the privacy policy? Yes, that will be deliberate because there's no way to know if a given change is a meaningful change. (Even a comma can legally alter the meaning)
Title: Re: GDPR Helper
Post by: Hero2019 on March 08, 2019, 05:39:07 AM
ok thanks.
Title: Re: GDPR Helper
Post by: kruimeltje on March 08, 2019, 01:58:21 PM
Thanks for this mod!

I use the mod with SMF 2.1 RC1.

Is it possible to change the location of the 'Privacy Policy' link in the footer?
It is now placed under the SMF copyright, but I would like to put the link right next to it.
Is there a way to do this?

Thanks in advance!
Title: Re: GDPR Helper
Post by: vbgamer45 on March 08, 2019, 03:38:59 PM
You could just have to change the edit to where it occurs. This one links hooks into the copyright line.
Title: Re: GDPR Helper
Post by: kruimeltje on March 10, 2019, 11:28:16 AM
Quote from: vbgamer45 on March 08, 2019, 03:38:59 PM
You could just have to change the edit to where it occurs. This one links hooks into the copyright line.
And where / how can I edit that?
Title: Re: GDPR Helper
Post by: vbgamer45 on March 10, 2019, 11:36:25 AM
The edit is in sources/querystring.php You can try editing your index.template.php in your themes/default folder instead.
Title: Re: GDPR Helper
Post by: kruimeltje on March 10, 2019, 03:35:23 PM
Quote from: vbgamer45 on March 10, 2019, 11:36:25 AM
The edit is in sources/querystring.php You can try editing your index.template.php in your themes/default folder instead.

Thanks!
I deleted the <br/> in querystring.php and now the link is next to the copyright.  :D
Title: Re: GDPR Helper
Post by: @rjen on April 15, 2019, 03:51:41 PM
Dutch translation attached...
Title: Re: GDPR Helper
Post by: m4z on April 18, 2019, 09:53:52 AM
2.1rc2 with PostgreSQL can't be installed, because AFAICT (https://stackoverflow.com/questions/1009584/how-to-emulate-insert-ignore-and-on-duplicate-key-update-sql-merge-with-po/1011170#1011170) this is MySQL syntax:

ERROR: syntax error at or near "IGNORE"
LINE 1: INSERT IGNORE INTO betasmf_settings
^
Datei: /home/beta-smf/public_html/Packages/temp/gpdrinstall2.php
Zeile: 40


The dependency on MySQL isn't documented anywhere.
Title: Re: GDPR Helper
Post by: Arantor on April 18, 2019, 09:58:42 AM
To be fair, most plugins have never been tested on anything other than MySQL.
Title: Re: GDPR Helper
Post by: vbgamer45 on April 18, 2019, 11:19:49 AM
I haven't tested any of my mods on PostgreSQL and at this point due to very few requests I can only think of about 2 or three times in 10 years not planned.
Title: Re: GDPR Helper
Post by: m4z on April 18, 2019, 11:26:45 AM
Quote from: vbgamer45 on April 18, 2019, 11:19:49 AM
I haven't tested any of my mods on PostgreSQL and at this point due to very few requests I can only think of about 2 or three times in 10 years not planned.

That's disappointing since SMF officially supports it, but it's of course your choice. Could you add that info to the Mod site, though?
Title: Re: GDPR Helper
Post by: Arantor on April 18, 2019, 11:30:44 AM
You best go ask a lot of mod authors, because PGSQL in 2.0 is firmly a second class citizen, and it's still not really a first class citizen in 2.1 even if one of the devs has ploughed a lot of time trying to redress that balance.
Title: Re: GDPR Helper
Post by: vbgamer45 on April 18, 2019, 11:32:48 AM
done updated the modsite stats mysql for 2.0+ versions
Title: Re: GDPR Helper
Post by: m4z on April 18, 2019, 12:43:57 PM
Quote from: vbgamer45 on April 18, 2019, 11:32:48 AM
done updated the modsite stats mysql for 2.0+ versions

Thanks!


Quote from: Arantor on April 18, 2019, 11:30:44 AM
You best go ask a lot of mod authors, because PGSQL in 2.0 is firmly a second class citizen, and it's still not really a first class citizen in 2.1 even if one of the devs has ploughed a lot of time trying to redress that balance.

I probably will, for all mods I'm trying to install. Anything more should probably be an official announcement to 2.1 mod authors.  ;)
Title: Re: GDPR Helper
Post by: Arantor on April 18, 2019, 12:50:06 PM
Not really; the majority of 2.1 users are existing 2.0 users on MySQL...
Title: Re: GDPR Helper
Post by: m4z on April 19, 2019, 07:17:07 AM
Quote from: Arantor on April 18, 2019, 12:50:06 PM
Not really; the majority of 2.1 users are existing 2.0 users on MySQL...
Yeah, we all know the historical majority case is the only case that matters in everything IT. ::)
Title: Re: GDPR Helper
Post by: Arantor on April 19, 2019, 09:14:30 AM
I'm sorry, I thought you would appreciate practical and realistic advice about the situation you have chosen to put yourself in. Best of luck to you.
Title: Re: GDPR Helper
Post by: m4z on April 20, 2019, 07:36:33 AM
Quote from: Arantor on April 19, 2019, 09:14:30 AM
I'm sorry, I thought you would appreciate practical and realistic advice about the situation you have chosen to put yourself in. Best of luck to you.

I understood that, but your last comments seemed to also suggest something similar to "it would not be a good idea to communicate the fact that SMF2.1 claims to support Postgres to the Mod developers (so they can document when they don't), or to communicate the fact that basically no Mod supports Postgres to the users; instead let every new user be frustrated when they finally find out this inside knowledge".

I'm new here; I went straight for 2.1rc2 and thought I had read nothing about prior versions and what they supported in contrast to 2.1, but in fact I read the 2.0 install recommendations (https://wiki.simplemachines.org/smf/SMF2.0:Requirements_and_recommendations), thinking that document applied to 2.1 (but it doesn't exist yet for 2.1). That 2.0(!) document states:

Quote
* One of the following databases must be installed:
   * MySQL 4.0.18 or higher (at least 4.1.0 would be better) and PHP MySQL client API 4.0.18 or higher.
   * PostgreSQL 8.0 or higher (standard_conforming_strings must be set to off, starting from PostgreSQL 9.1 default is on)
   * SQLite SQLite 2.x (SMF is not compatible with SQLite 3.x)
* The following are requirements for the database:
   * For a clean SMF installation, at least 2 MB of storage space in the database. Please note that this is only enough for the installation.
   * The database user must have at least the following privileges: SELECT, INSERT, UPDATE, DELETE, ALTER, and INDEX.
   * The database user must have the CREATE and DROP privileges during installation, conversion and some package installs.

So I assumed when SMF supports Postgres (and doesn't footnote this in any way), so do the mods. Or, if a mod doesn't, that this would be visible to potential users (and vbgamer45 seemed to agree). I never imagined most of the mods to not support Postgres in such a way, and that would be very helpful to know up front.

I haven't chosen to put myself into this situation. There was no info at all about these consequences. (As my forum is a staging instance, I might install MySQL alongside Postgres now, I have other services using Postgres.) This means unnecessary work for me. Hence, when you seemed to suggest the current situation need not be improved, the sarcasm.
Title: Re: GDPR Helper
Post by: Arantor on April 20, 2019, 08:15:02 AM
In order for them to actually use Postgres, they have to do literally everything correctly; most mods do not (especially mods that came from 1.1.x), and since I think you're the fifth user I ever encountered using Postgres, you can imagine how well tested that functionality is.

2.1 is better; the core is better tested for Postgres than it used to be, but still the *vast* majority of mods have never been tested on Postgres and are unlikely to ever be - and the bugs that will be found are unlikely to be fixed.

Honestly it'd be quicker to outline what *does* work on Postgres rather than what doesn't since I'm certain there's more mods that won't work than that will.

I wasn't trying to suggest it need not be improved, merely that the reality of the situation largely ensures that it won't.
Title: Re: GDPR Helper
Post by: m4z on April 28, 2019, 03:54:47 PM
Quote from: vbgamer45 on April 18, 2019, 11:19:49 AM
I haven't tested any of my mods on PostgreSQL and at this point due to very few requests I can only think of about 2 or three times in 10 years not planned.

With a bit of monkeypatching (basically s/INSERT IGNORE/INSERT/g and s/REPLACE INTO/INSERT INTO/g) I got your mod to install on Postgres; are you interested in a PR?

Of course, as of yet, my version isn't safe to re-install because of my changes above. I wanted to go the route of deleting anything added by the mod from the DB in uninstall.php (but I first need to read a bit on mod development). Is this route reasonable to you, or would you prefer me trying to write up emulating functions for INSERT IGNORE and REPLACE INTO?
Title: Re: GDPR Helper
Post by: Massl on April 28, 2019, 04:46:35 PM
Hi, with smf 2.1 RC2 I have many errors:
2: inet_ntop(): Invalid in_addr value
/home/public_html/Sources/Subs.php (Riga 5749)


They are created when viewing messages of a deleted user.

EDIT: I believe it is due to the conversion from mybb and it is not a problem of this mod, I see now that many poster_ip are "NULL"
Title: Re: GDPR Helper
Post by: Arantor on April 28, 2019, 05:25:24 PM
Quote from: m4z on April 28, 2019, 03:54:47 PM
Quote from: vbgamer45 on April 18, 2019, 11:19:49 AM
I haven't tested any of my mods on PostgreSQL and at this point due to very few requests I can only think of about 2 or three times in 10 years not planned.

With a bit of monkeypatching (basically s/INSERT IGNORE/INSERT/g and s/REPLACE INTO/INSERT INTO/g) I got your mod to install on Postgres; are you interested in a PR?

Of course, as of yet, my version isn't safe to re-install because of my changes above. I wanted to go the route of deleting anything added by the mod from the DB in uninstall.php (but I first need to read a bit on mod development). Is this route reasonable to you, or would you prefer me trying to write up emulating functions for INSERT IGNORE and REPLACE INTO?

$smcFunc['db_insert'] should already support both, if not there are bigger problems...
Title: Re: GDPR Helper
Post by: Massl on April 29, 2019, 03:20:15 AM
Quote from: Massl on April 28, 2019, 04:46:35 PM
Hi, with smf 2.1 RC2 I have many errors:
2: inet_ntop(): Invalid in_addr value
/home/public_html/Sources/Subs.php (Riga 5749)


They are created when viewing messages of a deleted user.

EDIT: I believe it is due to the conversion from mybb and it is not a problem of this mod, I see now that many poster_ip are "NULL"

The problem is this mod that sets to 127.0.0.1 poster_ip for all messages of the deleted users.
Title: Re: GDPR Helper
Post by: vbgamer45 on April 29, 2019, 03:22:34 AM
strange i thought null would be more of an issue than 127.0.0.1
Title: Re: GDPR Helper
Post by: Massl on April 29, 2019, 04:54:21 AM
I thought so too...
https://github.com/SimpleMachines/SMF2.1/issues/3548
https://github.com/SimpleMachines/SMF2.1/pull/3570
Title: Re: GDPR Helper
Post by: m4z on April 29, 2019, 09:56:53 AM
Quote from: Arantor on April 28, 2019, 05:25:24 PM
Quote from: m4z on April 28, 2019, 03:54:47 PM
With a bit of monkeypatching (basically s/INSERT IGNORE/INSERT/g and s/REPLACE INTO/INSERT INTO/g) I got your mod to install on Postgres; are you interested in a PR?

Of course, as of yet, my version isn't safe to re-install because of my changes above. I wanted to go the route of deleting anything added by the mod from the DB in uninstall.php (but I first need to read a bit on mod development). Is this route reasonable to you, or would you prefer me trying to write up emulating functions for INSERT IGNORE and REPLACE INTO?

$smcFunc['db_insert'] should already support both, if not there are bigger problems...

Ah, it took me a moment to understand your point. The GDPR mod isn't using $smcFunc['db_insert'] for these DB interactions, but $smcFunc['db_query']. I don't know if that can be easily changed, but I'll look into that function later this week.
Title: Re: GDPR Helper
Post by: vbgamer45 on April 30, 2019, 06:49:55 AM
It could be just requires minor changes. I do the other way for two reasons easier to move code to different platforms and just easier to view/modify
Title: Re: GDPR Helper
Post by: Massl on May 12, 2019, 01:44:34 PM
Quote from: vbgamer45 on April 29, 2019, 03:22:34 AM
strange i thought null would be more of an issue than 127.0.0.1

Hi, do you know how I can fix it?
Thank you
Title: Re: GDPR Helper
Post by: m4z on May 21, 2019, 05:39:23 PM
I just found a huge problem (for my usecase): When guests aren't allowed to "browse the forum", they can't access the Privacy Policy.
Title: Re: GDPR Helper
Post by: vbgamer45 on May 21, 2019, 05:47:55 PM
Edit /index.php

find
[code[
// If guest access is off, a guest can only do one of the very few following actions.
elseif (empty($modSettings['allow_guestAccess']) && $user_info['is_guest'] && (!isset($_REQUEST['action']) || !in_array($_REQUEST['action'], array('coppa', 'login', 'login2', 'register', 'register2', 'reminder', 'activate', 'help', 'smstats', 'mailq', 'verificationcode', 'openidreturn'))))
{
require_once($sourcedir . '/Subs-Auth.php');
return 'KickGuest';
}


Add gdpr to the action array.
Title: Re: GDPR Helper
Post by: m4z on May 21, 2019, 05:56:05 PM
Thanks for the lightning-speed response!

Adding "gdpr" has no effect, but "gpdr" works.  ::)
Title: Re: GDPR Helper
Post by: m4z on September 08, 2019, 08:01:49 AM
GDPR Helper 1.0.5c on SMF 2.1rc2 (also applies to current Github HEAD):

1.) The mod attempts to create a link from the webmaster mail address in the Privacy Policy. In my case this fails to recognize I'm on a subdomain, and only the main domain part is (correctly) linked to itself; are subdomains skipped on purpose?
Quote[email protected]my-domain.de

2.) Vanilla SMF comes with a one-line footer:
QuoteSMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Go Up ▲

After installing GDPR Helper, you've now got a two-line footer:
QuoteSMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Go Up ▲
Privacy Policy

Could this be changed to be a one-liner instead? I'm thinking of something like this:
QuoteSMF 2.1 RC2 © 2019, Simple Machines    [...]    Help | Terms and Rules | Privacy Policy | Go Up ▲
Title: Re: GDPR Helper
Post by: vbgamer45 on September 08, 2019, 10:33:19 AM
#1. It is based on $webmaster_email  from SMF under Server Settings

#2. Could be changed. Check the hooks file and edit the line for privacy policy.
Title: Re: GDPR Helper
Post by: m4z on September 08, 2019, 11:28:26 AM
Quote from: vbgamer45 on September 08, 2019, 10:33:19 AM
#1. It is based on $webmaster_email  from SMF under Server Settings

Hmm, do I assume correctly that you're saying the link is added by vanilla SMF? The value of that variable is the plain mail address; gpdr.php/gpdr2.php just seems to str_replace the variable value into the page. I can't find how/where the link is added though...


Quote from: vbgamer45 on September 08, 2019, 10:33:19 AM
#2. Could be changed. Check the hooks file and edit the line for privacy policy.

Thanks for the pointer, will do.


Btw, when I try to uninstall, I get an incorrect header ("Uninstall Feedback for Login Security", might already have reported this on GH), plus:
QuoteDatabase Error
ERROR: duplicate key value violates unique constraint "alphasmf_settings_pkey"
DETAIL: Key (variable)=(downloads_smfversion) already exists.
File: /home/alpha-smf/public_html/Packages/temp/GDPRHelper1.0.5/dohooks.php
Line: 39

After that, the package seems to be partially uninstalled: the patched files from vanilla SMF seem to be patched still, but all files added by GDPR Helper are already uninstalled (AFAICT from the following attempt to uninstall the package). Is this another Postgres issue?
Title: Re: GDPR Helper
Post by: shawnb61 on September 08, 2019, 12:33:22 PM
Quote from: vbgamer45 on April 30, 2019, 06:49:55 AM
It could be just requires minor changes. I do the other way for two reasons easier to move code to different platforms and just easier to view/modify

$smcFunc['db_insert'] must be used for pg support. 
Title: Re: GDPR Helper
Post by: Arantor on September 08, 2019, 01:56:34 PM
The mod makes it fairly clear that PGSQL isn't supported (or at least, isn't tested and no compatibility is claimed, like 99% of all SMF mods it's simply never been tested on what has *always* been the second class citizen in 2.0)
Title: Re: GDPR Helper
Post by: m4z on September 08, 2019, 03:56:08 PM
Quote from: shawnb61 on September 08, 2019, 12:33:22 PM
Quote from: vbgamer45 on April 30, 2019, 06:49:55 AM
It could be just requires minor changes. I do the other way for two reasons easier to move code to different platforms and just easier to view/modify

$smcFunc['db_insert'] must be used for pg support.

Ah, thanks. I have it on my todo list to look into postgres compatibility, but I completely forgot about the db_insert/db_query detail.
Title: Re: GDPR Helper
Post by: m4z on September 08, 2019, 04:02:32 PM
Quote from: Arantor on September 08, 2019, 01:56:34 PM
The mod makes it fairly clear that PGSQL isn't supported (or at least, isn't tested and no compatibility is claimed, like 99% of all SMF mods it's simply never been tested on what has *always* been the second class citizen in 2.0)

We've had that discussion in this thread before. ;)
I have basic postgres support working for months (although apparently I never tried uninstalling) and nagged the author (vbgamer) here and on Github about getting this and other stuff merged, but it isn't anywhere near a PR (and even then IIRC the author said he had little interest in postgres support)...
Title: Re: GDPR Helper
Post by: moyack on September 08, 2019, 10:16:42 PM
Hi!!

I've just installed this mod and after setting the option of reagree the privacy policy, it block the site showing a blank page with the text "Numeric request keys are invalid." and the address is forced to this: https://wc3modding.info/gpdr/sa/privacypolicy/reagree/1/

Any help would be appreciated to solve this issue.
Title: Re: GDPR Helper
Post by: vbgamer45 on September 08, 2019, 10:23:20 PM
That looks like a server issue or a mod issue.
That is not a standard SMF url. Could be caused by mod_security in apache maybe?
Title: Re: GDPR Helper
Post by: moyack on September 08, 2019, 10:41:08 PM
Quote from: vbgamer45 on September 08, 2019, 10:23:20 PM
That looks like a server issue or a mod issue.
That is not a standard SMF url. Could be caused by mod_security in apache maybe?

That URL is made by portaMX SEF. But unfortunately I'm stuck to disable it.
Title: Re: GDPR Helper
Post by: vbgamer45 on September 08, 2019, 10:44:08 PM
You can remove... from sources/querystring.php this code...


// Same goes for numeric keys.
foreach (array_merge(array_keys($_POST), array_keys($_GET), array_keys($_FILES)) as $key)
if (is_numeric($key))
die('Numeric request keys are invalid.');
Title: Re: GDPR Helper
Post by: moyack on September 08, 2019, 11:13:42 PM
Quote from: vbgamer45 on September 08, 2019, 10:44:08 PM
You can remove... from sources/querystring.php this code...


// Same goes for numeric keys.
foreach (array_merge(array_keys($_POST), array_keys($_GET), array_keys($_FILES)) as $key)
if (is_numeric($key))
die('Numeric request keys are invalid.');

Removed, but it gets reloading... the same page https://wc3modding.info/gpdr/sa/privacypolicy/reagree/1/

Is there a temporary way to disable the forcing of the agreement changing something in your mod? With this I can access to the site and disable SEF in portamx for your mod.
Title: Re: GDPR Helper
Post by: vbgamer45 on September 08, 2019, 11:46:32 PM
I would remove the section of code that calls the redirect.
Title: Re: GDPR Helper
Post by: moyack on September 09, 2019, 01:16:42 AM
Quote from: vbgamer45 on September 08, 2019, 11:46:32 PM
I would remove the section of code that calls the redirect.
Well, I'm checking the gprd2.php, but there's a lotr of redirect functions. in which one you recommend to make the modification?
Title: Re: GDPR Helper
Post by: moyack on September 09, 2019, 08:47:02 AM
Ok, fixed the issue.

I was a little dumb and I forgot to check the code modifications.

Anyways I'd suggest to add to the documentation that you have to add an exception to SEF to the gpdr because the issue was that.

Checking any other stuff, but in general, nice mod.

Thanks for your support.  ;)
Title: Re: GDPR Helper
Post by: moyack on September 12, 2019, 11:02:31 AM
Hi again:

One question: In my site I have 2 themes, where a board uses the other theme.

When I try to enter to that board, it forces the re-agreement. So I accept it, but when I try to enter again to that board, it reloads the re-agreement page.

How can I fix this?
Title: Re: GDPR Helper
Post by: Kindred on September 12, 2019, 11:18:37 AM
Sounds like there were theme edits which you did not apply to the secondary theme files
Title: Re: GDPR Helper
Post by: moyack on September 12, 2019, 11:20:31 AM
Quote from: Kindred on September 12, 2019, 11:18:37 AM
Sounds like there were theme edits which you did not apply to the secondary theme files
Hmm, probably, but the installation didn't add any modification to the theme... as far as I remember.
Title: Re: GDPR Helper
Post by: Kindred on September 12, 2019, 12:00:45 PM
Oh....  I see the possible problem.

I think that the mod stores the data of having read/accepted the policy in the extended user data...   this data is stored in a table and associated by option/user to each theme....
Since the theme is only in use for that one board, the acceptance 1- is not recorded for that user on that theme and 2- potentially may not get stored to that theme...




VBGamer...   I did just notice something

$buffer = preg_replace('~(, Simple Machines LLC</a>)~', ', Simple Machines LLC</a>....


why LLC? Simple machines has not been an LLC for a long time now...
Title: Re: GDPR Helper
Post by: vbgamer45 on September 12, 2019, 01:58:09 PM
Kindred for the copyright I think it was for odd SMF verisons. I copy the code from mod to mod to handle all cases.
Title: Re: GDPR Helper
Post by: vbgamer45 on September 23, 2019, 03:00:10 PM
If you are using SMF 2.0.x and you already have this mod installed. This is a must update to prepare for SMF 2.0.16

1.0.6
+Adds support to copy to SMF's 2.0.16 privacy policy and agreement data.
Data is copied on install/upgrade so are ready for SMF 2.0.16
Title: Re: GDPR Helper
Post by: @rjen on September 23, 2019, 03:12:37 PM
Two questions.

1. +Adds support to copy to SMF's 2.0.16 privacy policy and agreement data. > is that somewhere visible to admins?

2. Why do the settings still state:  Your Version: 1.0.5b Latest Version: 1.0.5b after the upgrade to 1.06 is done?
Title: Re: GDPR Helper
Post by: vbgamer45 on September 23, 2019, 03:18:45 PM
1. Does it automatically on install/upgrade. And any new user going forward records it the SMF 2.0.16
2. Forgot to update that fill fix now.
Title: Re: GDPR Helper
Post by: Black Tiger on September 23, 2019, 05:56:37 PM
Have a couple of questions:
1.) I don't quite understand the last answer about the GPDR version stating it's version 1.0.5b instead of 1.0.6, having the same on a friends forum.
2.) What's the best way to upgrade from 1.04 or 1.05?
3.) SMF 2.0.16? Any ETA on the release date of 2.0.16?
Title: Re: GDPR Helper
Post by: vbgamer45 on September 23, 2019, 06:14:33 PM
1. As long as the package says 1.0.6 the fix is in.
2. install newest version via package manager
3. can't answer when it's released.
Title: Re: GDPR Helper
Post by: Black Tiger on September 23, 2019, 06:36:20 PM
1.) In the package managers itself it says 1.06, it only says 1.05b in the settings so I presume it's fine then.
2.) Hmmz... I uninstalled 1.04, then installed 1.06 via the package manager, then I had 1.04 displaying uninstalled but with upgrade button and 1.06 installed also. So it seems not to replace then 1.04 even when uninstalled.
So I uninstalled 1.06 again, deleted the 1.04, installed 1.06 again and then it was fine.
Should I not have uninstalled 1.04 before installing 1.06?
3.) Ok.
Title: Re: GDPR Helper
Post by: vbgamer45 on November 03, 2019, 07:50:58 PM
Note: When upgrading to 2.0.16 or SMF 2.1 RC3 best way to carry over the GDPR information is to uninstall the old version of GDPR Helper then install newest version of GDPR Helper.
Next, uninstall GDPR Helper, then install SMF 2.0.16 or SMF 2.1 RC3
Title: Re: GDPR Helper
Post by: lurkalot on December 14, 2019, 02:58:55 PM
Quote from: vbgamer45 on September 23, 2019, 06:14:33 PM
1. As long as the package says 1.0.6 the fix is in.
2. install newest version via package manager
3. can't answer when it's released.

Think this might lead to a load of support request if left like this. I still had 1.0.3 installed, uninstalled it and installed 1.0.6  And it says,

"Your Version: 1.0.5b Latest Version: 1.0.6 Your GDPR Helper version is not up to date!
Download a the latest version now! "
Title: Re: GDPR Helper
Post by: vbgamer45 on December 15, 2019, 06:30:50 AM
Fixed the download thanks
Title: Re: GDPR Helper
Post by: lurkalot on December 15, 2019, 07:27:22 AM
Quote from: vbgamer45 on December 15, 2019, 06:30:50 AM
Fixed the download thanks

Thank you. All looks good now.  ;)

Your Version: 1.0.6 Latest Version: 1.0.6
Title: Re: GDPR Helper
Post by: m4z on December 15, 2019, 04:08:04 PM
Quote from: vbgamer45 on September 23, 2019, 03:00:10 PM
If you are using SMF 2.0.x and you already have this mod installed. This is a must update to prepare for SMF 2.0.16

1.0.6
+Adds support to copy to SMF's 2.0.16 privacy policy and agreement data.
Data is copied on install/upgrade so are ready for SMF 2.0.16

So when using GDPR Helper on 2.0.x, I need to update the mod to 1.0.6 (or do a fresh install of 1.0.6), and then i apply the 2.0.16 patch without uninstalling the mod? (Or do I uninstall the mod after updating/installing it?)

[Edit]: Nevermind, just found this:

Quote from: vbgamer45 on November 03, 2019, 07:50:58 PM
Note: When upgrading to 2.0.16 or SMF 2.1 RC3 best way to carry over the GDPR information is to uninstall the old version of GDPR Helper then install newest version of GDPR Helper.
Next, uninstall GDPR Helper, then install SMF 2.0.16 or SMF 2.1 RC3
Title: Re: GDPR Helper
Post by: vbgamer45 on December 18, 2019, 05:22:03 PM
1.0.7
!Fixes importing of data for SMF 2.0.16 update
Title: Re: GDPR Helper
Post by: vbgamer45 on December 19, 2019, 10:16:54 PM
1.0.8
!Handle updating privacy policy on edit for SMF 2.0.16
Title: Re: GDPR Helper
Post by: KittyGalore on December 28, 2019, 02:48:32 AM
Quote from: vbgamer45 on December 19, 2019, 10:16:54 PM
1.0.8
!Handle updating privacy policy on edit for SMF 2.0.16
A error in the ManageRegistration.php with SMF 2.0.16

Code: (Find)updateSettings(array('requireAgreement' => !empty($_POST['requireAgreement'])));
Code: (Add After)// Start GPDR Helper

    updateSettings(
array(
    'gpdr_last_agreementdate' => time(),

));


// END GPDR Helper
Title: Re: GDPR Helper
Post by: vbgamer45 on December 28, 2019, 08:16:11 AM
This should be uninstalled with SMF 2.0.16 check announcement. Since GDPR support is built into SMF 2.0.16
Title: Re: GDPR Helper
Post by: KittyGalore on December 28, 2019, 08:39:27 AM
Quote from: vbgamer45 on December 28, 2019, 08:16:11 AM
This should be uninstalled with SMF 2.0.16 check announcement. Since GDPR support is built into SMF 2.0.16
I never had the mod installed so i didn't have to do this step if it's built into it with 2.0.16 is there any need to install it at all.
Title: Re: GDPR Helper
Post by: HDB on December 28, 2019, 08:42:10 AM
Quote from: vbgamer45 on December 28, 2019, 08:16:11 AM
This should be uninstalled with SMF 2.0.16 check announcement. Since GDPR support is built into SMF 2.0.16
Is this the case for your GDPR Pro version as well?
Title: Re: GDPR Helper
Post by: vbgamer45 on December 28, 2019, 08:58:30 AM
I would suggest it. But in both cases I am using GDPR helper or pro on my own sites currently.
Title: Re: GDPR Helper
Post by: vbgamer45 on January 18, 2020, 06:20:15 PM
Update
1.0.9
!Fixed registering a user from admin area for SMF 2.0.x and 2.1.x, 1.1.x
Title: Re: GDPR Helper
Post by: kitz on March 05, 2020, 07:18:12 PM
Bit of help would be appreciated please.  I'm trying to update to SMF 2.0.17, but have hit a snag when following the instructions here (https://www.simplemachines.org/community/index.php?topic=571067.0).

I have backed up my existing privacy policy and updated GDPR helper to the latest version (1.0.9) but don't seem to be able to do the next recommended step which is to uninstall GDPR helper and I get the following errors.

I also notice that in admin > GDPR Helper it says "Your Version: 1.0.9 Latest Version: 1.0.8 Your GDPR Helper version is not up to date!"

Any ideas how to proceed next please.  - Screen cap below of errors.
Title: Re: GDPR Helper
Post by: kitz on March 05, 2020, 07:24:01 PM
Further to the above... I'm a bit of a novice when it comes to any manual editing of the source files,  but I have tried to do some investigating myself and have found the following.

Subs-Members.php
Code: (Find) [Select]

// Start GPDR Helper
if (empty($modSettings['gpdr_clear_memberinfo']))
{
// Make these peoples' posts guest posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:guest_id}, poster_email = {string:blank_email}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'blank_email' => '',
'users' => $users,
)
);
}
else
{
global $sourcedir;

require_once($sourcedir . '/gpdr2.php');
GPDR_CleanMemberInfo($users);
}

// END GPDR Helper



Mine says


// Start GPDR Helper
if (empty($modSettings['gpdr_allow_export_userdata']))
{
// Make these peoples' posts guest posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:guest_id}, poster_email = {string:blank_email}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'blank_email' => '',
'users' => $users,
)
);
}
else
{
global $sourcedir;

require_once($sourcedir . '/gpdr2.php');
GPDR_CleanMemberInfo($users);
}

// END GPDR Helper




/Sources/Register.php



Code: (Find) [Select]

// Start GPDR Helper
if (!empty($modSettings['gpdr_enable_privacy_policy']))
{
if (!isset($_REQUEST['privacy_agree']) && !$user_info['is_admin'])
$reg_errors[] = $txt['gpdr_txt_privacy_fail'];
}
// END GPDR Helper
// Lets check for other errors before trying to register the member.



Mine


// Start GPDR Helper
if (!empty($modSettings['gpdr_enable_privacy_policy']))
{
if (!isset($_REQUEST['privacy_agree']))
$reg_errors[] = $txt['gpdr_txt_privacy_fail'];
}
// END GPDR Helper
// Lets check for other errors before trying to register the member.


Unsure of next steps please.
Title: Re: GDPR Helper
Post by: vbgamer45 on March 05, 2020, 07:50:21 PM
Uninstall then attach those two files.
Title: Re: GDPR Helper
Post by: dowhelp on June 18, 2020, 11:50:56 AM
Hi

I uninstalled and get this error:

Undefined index: gpdr_privacypolicy
Undefined index: gpdr_text_settings
Undefined index: gpdr_title

/public_html/forum/Sources/Admin.php

Im on 2.017
PHP 7.2



Should i manually remove from admin.php:

'gpdr' => array(
'title' => $txt['gpdr_title'],
'permission' => array('admin_forum'),
'areas' => array(
'gpdr' => array(
'label' => $txt['gpdr_title'],
'file' => 'gpdr2.php',
'function' => 'GPDR_Main',
'custom_url' => $scripturl . '?action=admin;area=gpdr;sa=settings;sesc=' . $sc,
'icon' => 'server.gif',
'subsections' => array(
'settings' => array($txt['gpdr_text_settings']),
'privacyadmin' => array($txt['gpdr_privacypolicy']),
),
),),
),



Thank you in advance.
Title: Re: GDPR Helper
Post by: vbgamer45 on June 18, 2020, 12:03:12 PM
Yes, that will fix it.
Title: Re: GDPR Helper
Post by: dowhelp on June 18, 2020, 12:17:35 PM
Quote from: vbgamer45 on June 18, 2020, 12:03:12 PM
Yes, that will fix it.

I have done that.

These errors now show:
: Undefined index: gpdr_txt_exportdata

/public_html/forum/Sources/Profile.php
Line: 256




Undefined index: gpdr_txt_privacy_header

/public_html/forum/Themes/default/languages/TPShout.english.php (registration_form sub template - eval?)
Line: 380




Undefined index: gpdr_txt_privacy_desc

/public_html/forum/Themes/default/languages/TPShout.english.php (registration_form sub template - eval?)
Line: 384



Undefined index: gpdr_txt_privacy_agree

/public_html/forum/Themes/default/languages/TPShout.english.php (registration_form sub template - eval?)
Line: 387



I uninstalled as per instructions. Not sure why this has happened.

I have an issue where new members cannot register they just get looped to "registration agreement" then "Registration form"

I appreciate your help.

Thank you

Title: Re: GDPR Helper
Post by: vbgamer45 on June 18, 2020, 03:35:12 PM
Looks like it didn't uninstall
upload mod to https://www.smfhacks.com/smf-package-parser.html and get the uninstall steps
Title: Re: GDPR Helper
Post by: dowhelp on June 18, 2020, 03:43:09 PM
Quote from: vbgamer45 on June 18, 2020, 03:35:12 PM
Looks like it didn't uninstall
upload mod to https://www.smfhacks.com/smf-package-parser.html and get the uninstall steps

Hi
Is it possible to reinstall the mid and try to uninstall again?

Thank you
Title: Re: GDPR Helper
Post by: vbgamer45 on June 18, 2020, 03:57:55 PM
No it would create create duplicate install issues.
Title: Re: GDPR Helper
Post by: dowhelp on June 19, 2020, 09:58:53 AM
Thank you for your help vbmer45. It seems to be working now after I followed your instructions. There are now now errors showing.

Regards

Title: Re: GDPR Helper
Post by: bod22 on August 15, 2020, 01:50:53 PM
Hi,

I have a question. Does GDPR Helper make any changes in database?

I used it on my 2.0.15. It worked fine. Then 2.0.16 was released and I don't remember if I uninstalled it after upgrading or before but since then I have some issues on my forum and I can't update forum to 2.0.16 and 2.0.17.

Of course I installed the latest version and later uninstalled it so it should have any impact but I'm just curious maybe sth left somewhere?
Title: Re: GDPR Helper
Post by: vbgamer45 on August 16, 2020, 11:40:54 PM
Yes, it does add a couple columns to the database and some entries into a few tables.

What are you getting upgraded. I haven't heard of any issues related to a SMF upgrade.
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 06:25:13 PM
It does :(

I'm still stuck trying to upgrade to 2.0.17 too.   (link (https://www.simplemachines.org/community/index.php?topic=560637.msg4048501#msg4048501))
Admittedly I've been stuck in a brace for the past few months and unable to type which hasn't helped, but not all of us quite know what we are supposed to be editing when upgrades fail.  :'(
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 06:41:30 PM
Did you uninstall gdpr  helper via the package manager?
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 06:46:17 PM
Couldn't uninstall as I got errors.

Sorry, but wasn't quite sure what you meant by this

QuoteUninstall then attach those two files.
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 06:52:00 PM
Attach the files were it failed when you uninstall.
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 07:02:54 PM
ok I'm being really dumb.    Attach which files to where?  :(


In my previous post I included the log showing where the uninstall failed.   Then I posted the relevant parts  of text where I think it is failing. 


I don't ever usually manually edit any of the core files and leave everything to package manager, so I'm a total novice when it comes to editing anything in SMF.
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 07:11:22 PM
To this topic. So I can analyze and fix.
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 07:21:28 PM
Ah cheers, thought because I'd pasted code that was sufficient. 
Error messages I got when trying to uninstall are included in the other post.
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 07:26:04 PM
Fixed files attached.
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 08:06:51 PM
Your help is appreciated, but still unable to uninstall and having errors in the same two files, but now 2 errors in Register.php


Subs-Members.php
Find
// Start GPDR Helper
if (empty($modSettings['gpdr_clear_memberinfo']))
{
// Make these peoples' posts guest posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:guest_id}, poster_email = {string:blank_email}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'blank_email' => '',
'users' => $users,
)
);
}
else
{
global $sourcedir;

require_once($sourcedir . '/gpdr2.php');
GPDR_CleanMemberInfo($users);
}

// END GPDR Helper


Replace
// Make these peoples' posts guest posts.
$smcFunc['db_query']('', '
UPDATE {db_prefix}messages
SET id_member = {int:guest_id}, poster_email = {string:blank_email}
WHERE id_member IN ({array_int:users})',
array(
'guest_id' => 0,
'blank_email' => '',
'users' => $users,
)
);



Register.php

Find
// Start GPDR Helper
if (!empty($modSettings['gpdr_enable_privacy_policy']))
{
if (!isset($_REQUEST['privacy_agree']) && !$user_info['is_admin'])
$reg_errors[] = $txt['gpdr_txt_privacy_fail'];
}
// END GPDR Helper
// Lets check for other errors before trying to register the member.


Replace

// Lets check for other errors before trying to register the member.


and
Find
// Do our spam protection now.
spamProtection('register');
// Start GPDR Helper
if (!is_array($memberID))
{
global $smcFunc, $settings;
        $t = time();
          $smcFunc['db_query']('', "
REPLACE INTO {db_prefix}themes
(ID_MEMBER, ID_THEME, variable, value)
VALUES
                (" . $memberID . "," . $settings['theme_id']  . ",'gpdr_agreementdate','$t')
                ");


if (!empty($modSettings['gpdr_enable_privacy_policy']))
{
          $smcFunc['db_query']('', "
REPLACE INTO {db_prefix}themes
(ID_MEMBER, ID_THEME, variable, value)
VALUES
                (" . $memberID . "," . $settings['theme_id']  . ",'gpdr_policydate','$t')
                ");
    }

        cache_put_data('theme_settings-' . $settings['theme_id'] . ':' . $memberID, null, 60);
}
// END GPDR Helper



Replace
// Do our spam protection now.
spamProtection('register');



From my basic knowledge it looks ok and as if it should work  :/



Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 08:15:55 PM
Did you replace the files?  Then uninstall mod.
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 08:21:17 PM
I ftp'd the new files, then tried running uninstall from package manager.   
I attached a screen cap of what happened when I tried to uninstall to my prev post a few mins ago. .
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 08:28:07 PM
Yes that is fine process with uninstall.
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 08:32:37 PM
so ignore the errors and just go for it?
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 08:32:49 PM
Yes
Title: Re: GDPR Helper
Post by: kitz on August 19, 2020, 08:55:40 PM
Thank you so much for your help.   The uninstall seemed to go ok.
I now have an error trying to update to 2.0.16 via package manager for Profile-Modify.php, but seeing as this isn't a file that appears to be related to GDPR (&thus not your responsibility) I shall take that elsewhere.

Thanks again  &  tyvm for creating GDPR Helper during the GDPR bedlam that occurred during 2018.   

---
ETA
Managed to sort it myself using knowledge you helped me gain tonight.  :)
Title: Re: GDPR Helper
Post by: vbgamer45 on August 19, 2020, 09:35:31 PM
Glad you have it all figured out.
Title: Re: GDPR Helper
Post by: Sir Osis of Liver on December 13, 2020, 11:26:16 PM
Just upgraded a forum from 2.0.15 to .17, had to uninstall GDPR Pro to install .16 patch, am unable to reinstall mod in .17, target code is not there.

ManageRegistration.php



updateSettings(array('requireAgreement' => !empty($_POST['requireAgreement'])));

Title: Re: GDPR Helper
Post by: vbgamer45 on December 14, 2020, 09:49:32 AM
In Sources/ManageRegistration.php

Add After

updateSettings($agreement_settings);
Title: Re: GDPR Helper
Post by: Sir Osis of Liver on December 14, 2020, 11:37:12 AM
Is GDPR really necessary for a US based forum?  Most of my guys don't use it, nor do I.

n/m, forgot that GDPR was added as core feature in 2.0.16/.17.