Ah, it shouldn’t change the private ID when a matching record is submitted if the setting is “update”. I need to find a fix for that. It should work as an update.
Your second question I’m not sure I understand. It’s probably possible…
So, the fix for the private ID getting reset is this…on line 1344 of participants-database.php you’ll find:
$new_value = empty($post['private_id']) ? self::generate_pid() : $post['private_id'];
Change this to:
$new_value = $action == 'insert' ? self::generate_pid() : false;
Now the private id will not be changed when a matching record is submitted.
Thread Starter
TigWeb
(@tigweb)
Thanks. Tested and works as expected. The second question was around just uploading certain fields for example. I have 3 fields called rego fee, fees paid & fees owing. These are the fields that get changed and I would like to just upload these fields and not all the other fields.
Just looking at it if I remove the check in the CSV for the fields I don’t want to upload that would work I think?
The Record ID that is added to the CSV DL is this the key field for each record? So as long as I change the other fields related to this Record ID the data will be correct?
Thanks again.
Yes, that’s correct. When you import, be sure to set the “match field” to “id”. Only the values present in the imported file will be changed, so you plan will work.
Hello,
I have used your great plug-in for a social sciences survey; it has been an excellent tool for this purpose. I am now in the phase of uploading the survey results back to the database so that each participant can see their own scores. Only participants themselves know their private_ids and no mail addresses nor other identification data were asked to guarantee participants’ anonymity. I am not sure if I should start a new thread, but my problem is similar to the one in this thread: I’ve tried to upload (import) my results (.csv file), but the private_ids change on every upload. So I decided to delete all records from the pdb and re-create them from scratch by uploading the .csv file. This did not help as all private_ids were re-generated again. Do you have a simple fix which simply copies private_ids (without generating them) when uploaded from a .csv file into an empty database? I am using WordPress 3.8.1 and pdb 1.5.4.(I actually managed to do this somehow with one of the previous versions of pdb few months ago).
Thank you in advance.
This is a bug in 1.5.4 that is fixed in 1.5.4.1. It’s not released yet, but if you want to use it, you can get it here: http://downloads.wordpress.org/plugin/participants-database.1.5.4.1.zip
And yes, it’s almost always best to start a new thread with a new question…especially if it has been marked resolved.
Thank you for your rapid response. I still need a bit guidance on what to do with the old participants database directory and its contents if I copy the new 1.5.4.1 on the server. I have all my pages and data fields defined somewhere there and I would not like to lose them (the data as such is on my computer in a safe place in the form of a .csv file ready to be uploaded, alright). Sorry for this beginners problem, but I am not willing to take any risks. (I guess there is no simple patch for the problem I presented in my previous mail, but I just have to upgrade the 1.5.4.1?)
General instructions -> “Download the zip file, and unzip it on your computer. Upload this directory (participants-database) and its contents to the /wp-content/plugins/ directory on your web server”.
There is no simple patch, you do need to upgrade, but it’s not as risky as it may sound. Just follow the directions and it will be fine. You will not lose settings or database entries.
First, back up your site using a backup plugin that will allow you to restore the previous state of the plugin. This is just in case, and it is always a good idea before upgrades.
Download and unzip the plugin (using the link to version 1.5.4.1 above) on your computer.
Go to the plugins page and deactivate participants database.
Then get on your FTP client, and go to the participants database plugin directory: it will be wp-content/plugins/participants-database/
Delete all the files inside the participants database folder (don’t worry, none of your data is in there), leaving the folder itself in place, then upload the plugin files from the zip file into the now empty participants-database directory.
Once that’s done, go back to the plugins page in your WordPress and activate the plugin.
You’re done. If you don’t want do all that and instead use the automatic update, wait until I release the update. I’m planning to do that this Saturday.
Thanks a lot once again for your quick response. I will follow your instructions.