
I’m afraid I have to start with an apology. You have probably opened this page expecting to find how to magically merge one family tree into another while identifying and reconciling all and any common records. I’m sorry, but kiwitrees simply does not try to do that.
Fully merging trees is something many people look for in family history software. A few products have tried, but the results are extremely variable. Depending on the methodology you often end up either spending hours resolving issues the machine cannot decide or, or at worst you get a completely mangled set of data. Undoubtedly for some people and some trees, these solutions can and do work. But for kiwitrees, I have decided not to try. If ‘merging’ is important to you, my best recommendation is the very specialised merging software “GenMerge” available online at http://www.genmerge.com/ It is, as far as I am aware, the only software designed with just this one purpose in mind. For that reason, it can do an excellent job. Also, being desktop-based it is not limited by the many time and volume constraints of a typical web server. But be prepared for a steep learning curve as the process of merging complex overlapping data is not a simple one!
So, apology out of the way, let me explain what kiwitrees CAN do. The administrative module “Append family tree” does just that. It “appends” (meaning: “add (something) to the end of a written document“) one tree to another. It does not attempt to merge similar or duplicated records. It is, therefore, best used where you know with reasonable certainty there are few duplicates. These you can, therefore, tidy up after appending, using the other administration tools “Find duplicate individuals” and “Merge records”.


Requirements
- Both of the trees must exist on your kiwitrees site before you start
- The “main” tree is the one you want to keep. Its a good idea to note how many records of each of the main types (individuals, families, sources, notes, media, and repositories) you have in this tree before the ‘append’, as a check that everything is included.
- The “new” tree is the one you want to add to the main tree. Once the append is complete and you have checked it, this can be deleted from your site. Note how many records of each type in this tree as well. A successful ‘append’ will contain the sum of both sets.
- Ensure there are no ‘pending changes’ for either tree.
- Ensure you have a current back-up of the GEDCOM file for both trees. Go to Administration > Family trees > Manage family trees and “export” both of them. Two GEDCOM files will be created in your kiwitrees/data/ folder, and will NOT be altered by the append process. So if anything does go wrong you can simply re-import both of them to get back to where you were before you started.
- Ensure you have no users on your site who would be able to try and edit records during the append process.
- The two trees must not have any record identification numbers (‘xref’s’ like I1234, F456, S27, M54, etc) that are the same. These must all be unique across both trees. See the next step to understand this requirement better.
Renumbering
To ensure the two tree have no record identification numbers in common you should first run the administration module Administration > Family tree tools > Renumber family trees. You will be reminded of this if you try to run “append” first, and will not be able to proceed if there are any duplicate IDs. When you perform this renumbering on any / either of your trees it’s ID’s will wherever necessary be changed to something unique from ANY other tree on your site.
- Make sure you are working in the right tree. Go to Administration > Family trees and select the tree you need by clicking on its name. You would normally select the new (or smaller) tree for this purpose, but it can be either.
- Now go to Administration > Family tree tools > Renumber family trees. The text there will confirm the tree you are about to renumber. Take careful note of the other information there before you click on “go” to start the renumbering.
- When you click ‘go’ the ID’s being changed will scroll onto the screen, until the process is completed. Then a final statement confirming completion will appear at the bottom unless an error occurs. Don’t be surprised if you get a partial screen at some point, perhaps more than once. The display refreshes in blocks of data. Be patient and wait for the completion message.
- If there is an error it will be explained in a message on the screen. All renumbering will be reversed, so you can proceed to fix whatever problem caused the failure and try again. But if you are feeling uncertain about what might or might not have happened simply re-import the two GEDCOM files you saved as back-ups earlier.
Append
Now that you have two trees with totally uniquely identified records you can proceed to append one onto the other. Go to Administration > Family tree tools > Append family tree.
Select the two trees, first the ‘new’ tree that you are appending from, and then the ‘main’ tree you are appending to, and click “continue”.
This part of the process does not take very long. Once finished the page will display the message: “The family trees were combined successfully.”
But remember what I said at the top of this page, kiwitrees does NOT merge records. So it is likely you now have some duplicates in your data. These could be individuals, families, sources, notes, repositories, or media objects. You will need to identify these yourself and use kiwitrees “merge records” feature (Administration > Family tree tools > Merge records). You may find the other administration tool “Find duplicate individuals” useful for this, or for a more thorough check download your newly enlarged GEDCOM file and use “GenMerge“. Although designed for complex file merging, it also does an excellent job of identifying all types of likely record duplications.
Notes
- There has been a report of this error message appearing on completion of the append process: Fatal error: Uncaught exception ‘PDOException’ with message ‘SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry ‘HEAD-xx-0’ for key ‘PRIMARY” in xxxxxxxxxxxkiwitreeslibraryWTDBStatement.php:91 Stack trace: #0 [internal function]: PDOStatement->execute(Array) #1 xxxxxxxxxxxkiwitreeslibraryWTDBStatement.php(91): call_user_func_array(Array, Array) #2 xxxxxxxxxxxkiwitreesadmin_trees_append.php(131): WT_DBStatement->__call(‘execute’, Array) #3 xxxxxxxxxxxkiwitreesadmin_trees_append.php(131): WT_DBStatement->execute(Array) #4 {main} thrown in xxxxxxxxxxxkiwitreeslibraryWTDBStatement.php on line 91 I have not yet been able to reproduce this to determine the cause. However it can safely be ignored as the process will have completed before the error. Just do the check of the number of records now in the main tree to be certain, as described in “Requirements” paragraph 1. above.
- Occasionally the append and/or subsequent duplicate merges can leave a tree out of synchronisation with its database equivalent. This shows as “odd” results, missing searches, etc.. There are two possible solutions. Which will work will depend on the exact problem, but it is easy and harmless to try both:
- Administration > Batch update > Update missing links. If that results in a “Nothing found” message, then you can safely ignore it and move on to the next option. Otherwise, correct each issue found, then try the next option here as well, just to be sure.
- Export (Administration > Family trees > Manage family trees) the updated main tree, then import that file back into the same tree. That will completely re-set all family tree data (for that tree only), including all the appended records.
- If neither of these solutions help, then you have a different problem entirely and should seek assistance from the support forum on this site.