• Resolved TigWeb

    (@tigweb)


    Only just DL and so far great plugin by the way.
    I am looking at using this as a central DB for our field hockey club which has around 250 members. At the moment like everyone we use Excel to manage registration information for players which can be messy with multiple copies of the same spreadsheet. I have set up the DB fields to suit the information we need and will be uploading the information. We also want to add the rego fees to each players record so they can see how much they owe. We will update the fee field in our financial spreadsheet once people pay and then upload the changes to the DB so it is visible to the players and this is where I have run into a small problem well 2 really.
    1. The problem is there is no “update” selection in the setting only overwrite and this changes the Private ID so the player can’t use their old ID to access their data. Any ideas?
    2. Can you just upload certain fields based on each record? (this is an option)

    Our players log on to the website so I was going to use that private ID to restrict that information by website username but if it changes every time we upload then it will be impossible to maintain.

    Thanks again for the plugin I will keep working on it.

    https://www.ads-software.com/plugins/participants-database/

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Author xnau webdesign

    (@xnau)

    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…

    Plugin Author xnau webdesign

    (@xnau)

    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.

    Plugin Author xnau webdesign

    (@xnau)

    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.

    Thread Starter TigWeb

    (@tigweb)

    Thanks again.

    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.

    Plugin Author xnau webdesign

    (@xnau)

    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: https://downloads.www.ads-software.com/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”.

    Plugin Author xnau webdesign

    (@xnau)

    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.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Upload changes Private ID when overwriting’ is closed to new replies.