- This topic has 8 replies, 2 voices, and was last updated 7 years, 3 months ago by
clandav.
-
6th June 2016 at 6:04 pm #6488
Small problem – have run the batch update, but on approving changes I receive the following:
{Pending changes
Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘I10951-1’ for key ‘PRIMARY” in /home/clandav/public_html/webtrees/library/WT/DBStatement.php:91 Stack trace: #0 [internal function]: PDOStatement->execute(Array) #1 /home/clandav/public_html/webtrees/library/WT/DBStatement.php(91): call_user_func_array(Array, Array) #2 /home/clandav/public_html/webtrees/includes/functions/functions_import.php(674): WT_DBStatement->__call(‘execute’, Array) #3 /home/clandav/public_html/webtrees/includes/functions/functions_import.php(674): WT_DBStatement->execute(Array) #4 /home/clandav/public_html/webtrees/includes/functions/functions_import.php(1113): import_record(‘0 @I10951@ INDI…’, ‘1’, true) #5 /home/clandav/public_html/webtrees/edit_changes.php(114): update_record(‘0 @I10951@ INDI…’, ‘1’, false) #6 {main} thrown in /home/clandav/public_html/webtrees/library/WT/DBStatement.php on line 91}
Ron in France Website: https://clan-davies.kiwitrees.net/ kiwitrees 3.3.11; PHP 8.0.14
-
6th June 2016 at 7:00 pm #6489
There could be a number of different causes for that such as:
1- exactly what it says :Duplicate entry for I10951
2- two death records for the same person
3- a bug, but in this case it’s the least likely.
4- something related to the following…….I have to ask why you ran it with needing to accept changes. Indeed I wonder why you as admin require yourself to approve your own changes at all. Doesn’t seem logical to my mind.
I’m pretty sure the batch update gives a pretty clear warning against doing just that. Very few installations can cope with a batch update that requires each of it’s changes to be approved as there may be thousands of changes, sometimes multiple ones to the same record.I would change your user setting to not require approval of changes, then re-run it. Ideally do this after re-importing the back up copy of your GEDCOM file you created before running the update tool, but if you didn’t do that just rerun it any way.
Nigel
My personal kiwitrees site is www.our-families.info -
6th June 2016 at 8:03 pm #6490
{I have to ask why you ran it with needing to accept changes. Indeed I wonder why you as admin require yourself to approve your own changes at all. Doesn’t seem logical to my mind.}
I certainly can’t disagree with that Nigel, BUT I did not intentionally run it in a way that required me to approve the changes. The only place that I am aware of where I can indicate this is in my own personal entry in the User table, where, of course, I have ‘Automatically approve changes made by this user’ set to ‘YES’. Is there another setting somewhere which relats to running batch updates? – I couldn’t find one.
This said, I re-ran the batch update and it seems to have worked perfectly OK this time. And Statistics now show 82.5% Dead – which sounds reasonable. So I really don’t understand what happened first time around!Ron in France Website: https://clan-davies.kiwitrees.net/ kiwitrees 3.3.11; PHP 8.0.14
-
6th June 2016 at 8:38 pm #6491
🙂 🙂
The only place that I am aware of where I can indicate this is in my own personal entry in the User table, where, of course, I have ‘Automatically approve changes made by this user’ set to ‘YES’. Is there another setting somewhere which relats to running batch updates?
Now you’re confusing me. In your previous post you said “...but on approving changes I receive the following” If you have ‘Automatically approve changes made by this user’ set to ‘YES’ for your user account why, or even how, would you be approving your changes ????
Is there another setting somewhere which relats to running batch updates?
No, your user details are the only place you need or can set it.
My reference to the warning was as per the attached image. But if you have auto accept = YES then you would not have seen it. Also, unless you have auto-accept = yes then you don’t get an option to “update all”.
So perhaps this is all a red-herring and your duplicate issue is nothing at all to do with batch update? Your error message refers to “functions_import.php”, so were you re-importing your GEDCOM file for some reason? If so, that’s a completely different issue and will mostly likely mean exactly what the error says – you have a duplication of an INDI record (I10951).or something related to it. At the very least I woulld carefully check that record for any anomalies.
Nigel
My personal kiwitrees site is www.our-families.info -
7th June 2016 at 12:07 am #6494
Curiouser and curiouser!
Just to clarify:
1. I have always had auto-accept=YES for my own user entry
2. I was not re-importing my GEDCOM – in fact I haven’t done that for years; the master GEDCOM is the one of the server and I back it up regularly but never replace it and have never (so far) had to restore a back up.
3. When I initiated the batch update, I was not shown the message you show in your attached image. I was merely shown, after some delay during which the cursor’wheel’ turned, the first individual for whom the ‘1 DEAT Y’ was to be added, with the options to update or update all – I selected update all, and the cursor wheel started turning again, and I guessed that it may take a while so I left the office to deal with something else.
4. When I returned, although there was no message to indicate that the process was complete, the cursor was no longer turning and I noticed top right, in red, the message ‘Pending Changes’ . I should point out that this is the first time I have seen that message since converting to kiwitrees well over a year ago, and that I am the only user with edit/change authority (all other users are ‘Members’ so they don’t make changes for me to approve.
5. Assuming that it was normal – although rather odd – for the batch update function to require me to go through the process of accepting the changes I clicked on ‘Pending Changes’ and was shown something which seemed familiar from PGV/webtrees days – with options to ‘Approve all changes’ or ‘Undo all changes’ – then identity details of a SINGLE change – followed by the Accept all/Undo all options again. I assumed that – although again a little odd – the batch update was showing me on just ONE record the change that would be made to all, and I clicked on ‘View GEDCOM record’ for that one individual (unfortunately I did not note the Indi Number and can’t remember the name, but it was a very simple GEDCOM file entry – only a few lines, I verified that the date of birth was more than 110 years ago and that the last line was ‘1 DEAT Y’ and clicked on ‘Accept All’
6. I then received the Fatal Error message that I attached to my earlier post.
7. Since your last response, I thought I should double-check that there had not been an extreme coincidence in which a user who did actually have edit authority by error had made a change at the same time as I was running a batch update!! There was one other user logged in at the time but I checked that he has only Member status. I also checked ALL other users who have logged in during the last month (just in case – although extremely unlikely – I had failed to spot the red message and someone else who had Editor authority in error had indeed submitted a change. Again negative.
8. I just ran the Family Tree tool – Check for GEDCOM errors to be sure that there is nothing residual in the GEDCOM – no errors found.
8. The only thing that I can think of that MAY perhaps have a bearing on the situation is that I remember answering the phone whilst I was in the process of initiating the batch update, and having completed the phone call and returned my attention to the PC, it wasn’t clear to me whether I had completed the process of initiating the update. As the batch update screen only shows the name of the Family Tree and the drop-down list of options – NO ‘run/start’ button to click having selected the option. It would appear that the mere act of selecting the option from the drop-down list initiates the batch update. This being the case – it is POSSIBLE that I unwittingly triggered a second update in error before a first one was complete. Could that help to explain any of these anomalies?Ron in France Website: https://clan-davies.kiwitrees.net/ kiwitrees 3.3.11; PHP 8.0.14
-
7th June 2016 at 8:06 am #6500
That is puzzling, but thanks for doing all those checks. Nothing particularly untoward there.
My best guess is a “glitch” caused by an expired session time related to both the number of changes required (as this was the first time for running this tool) and your intervening phone call. It is a bug of sorts, but I can’t even begin to imagine a process that would allow me to reproduce it sufficiently to investigate. As it seems to have done no harm I think we’ll have to leave this one alone.A couple of points though:
- I would recommend you now re-run the tool. It “should” run quickly and tell you there was nothing to change. If it does run then a) you know yesterday’s attempt didn’t fully complete, and b) it will now.
- In your point 2 above you said “I was not re-importing my GEDCOM – in fact I haven’t done that for years; the master GEDCOM is the one of the server and I back it up regularly but never replace it and have never (so far) had to restore a back up.“. I may be misunderstanding your words, but it sounds as if you might be under a slight misapprehension that could cause concern should you ever need that backup. To clarify – if you are referring to a GEDCOM file on your server (in the /data/ folder) then that is exactly the one you originally imported your data from. Kiwitrees never updates that file again. So you most certainly can NOT rely on that as a backup. My recommendation is in fact to always delete that file from your server once the import is finished as a) it serves no useful purpose being there, and b) could (remote possibility) be a security risk if left there.
For back up purposes either back up your database (from which you can regenerate a GEDCOM file at any time), or periodically export your data to a fresh GEDCOM file and immediately move that to your local PC or other external backup location, or even do both. - Regarding the original error message about duplicates, try running the new(ish) tool “Sanity check” (Administration > Family tree tools > Sanity check”) Tick “Death” under “Duplicated data” then click “Sanity check” and see if there are found, just in case, and tidy them up.
Nigel
My personal kiwitrees site is www.our-families.info -
7th June 2016 at 6:14 pm #6528
Thanks Nigel.
{I would recommend you now re-run the tool. It “should” run quickly}
Done – it ran quickly and correctly and found nothing to change and
{… master GEDCOM is the one of the server and I back it up regularly but never replace it ….“. I may be misunderstanding your words …. “}
You DID misunderstand – because my words were misleading. To be more precise, my regular backup process includes a GEDCOM EXPORT (from Admin-Manage Family Trees) to the data folder, from where I download to my PC, then delete from the data folder. I also backup the database (OK belt-and-braces but it can be useful to have a current GEDCOM on the PC).
{try running the new(ish) tool “Sanity check” }
Did that. It found a couple of duplicate death entries – which I have corrected.
{As it seems to have done no harm I think we’ll have to leave this one alone.}
Fully agreed – thanks and apologies for having taken up time over an inadvertently generated glitch.
Just one point that it highlighted though which may be worth thinking about modifying when convenient. The fact that the batch update is triggered not by a positive ‘start button’ but by the action of selecting one of several items in the drop-down list, with no opportunity to check and confirm that the selected item is the intended choice – which I think is the more normal approach?Ron in France Website: https://clan-davies.kiwitrees.net/ kiwitrees 3.3.11; PHP 8.0.14
-
7th June 2016 at 6:41 pm #6529
Just one point that it highlighted though which may be worth thinking about modifying when convenient. The fact that the batch update is triggered not by a positive ‘start button’ but by the action of selecting one of several items in the drop-down list, with no opportunity to check and confirm that the selected item is the intended choice
Not quite accurate Ron.
When you select “Add missing death records” from the drop down it only a) opens that particular tool, and b) checks to see if any changes might be needed. It then displays the first change it finds. Below that are two operational buttons : “Update” and “Update all”. Only by clicking on one of those will any change to your data be initiated.
The same is true for each batch update tool. At no time does any edit happen without specifically clicking on an update / update all button.
Nigel
My personal kiwitrees site is www.our-families.info -
7th June 2016 at 6:45 pm #6530
Ah! I agree that makes a big difference – thanks for correcting me – I had misunderstood!
Ron in France Website: https://clan-davies.kiwitrees.net/ kiwitrees 3.3.11; PHP 8.0.14
- The topic ‘Batch update – add missing death records’ is closed to new replies.