- This topic has prefixes assigned
10th December 2017 at 5:40 pm #9584
I’ve just noticed that in replacing the “WT_” references before the latest upgrade I missed the CHAN (change) records found throughout the family tree database. A typical example of the GEDCOM:
1 CHAN 2 DATE 15 MAY 2014 3 TIME 15:30:57 2 _WT_USER xxxxxxx
Similar code can also be found in “_TODO” records if you use them, and _WT_OBJE_SORT is used for sorting images within records.
Any new data you add or existing data you change will get the new _KT_USER tag.
This is not a major problem, and there are a few ways to fix it, with the first (below) being by far the easiest 🙂
- Do nothing. I will ensure it is fixed automatically during the next kiwitrees upgrade. No idea when that will be, but in the meantime, it is a harmless issue.
- Use the Administration > Batch update > Search & Replace tool to change _WT_USER to _KT_USER in all records. Easy to do, but the process may struggle on large family trees.
- In the file kiwitrees/includes/functions/functions_import.php insert a line in the section of lines 53-55 so they now look like this:
case '_PGVU': case '_WT_USER': $tag='_KT_USER'; break;
Then (using Administration > Family trees > Manage family trees) export, then immediately re-import your family tree. That process will correct the problem as each line of the GEDCOM is imported. It will marginally slow the import process (just this time) but it will still import OK.
That code change will be included in the next kiwitrees upgrade (3.3.3).
The similar code for _WT_OBJE_SORT already exists.
- If you can manage your database manually (using PHPMyAdmin or something similar), you can run the following SQL command.
UPDATE 'xx_xxxxxx' SET 'x_gedcom' = replace('x_gedcom', '_WT_', '_KT_')
But you will need to run it for each of the following tables, replacing their names for the xx_xxxxxx, and the field prefix (‘x’ above, twice)) in this code each time:
xx_individuals – with field name i_gedcom
xx_families – with field name f_gedcom
xx_media – with field name m_gedcom
xx_other – with field name o_gedcom
xx_sources – with field name s_gedcom
This is the code that will run automatically as part of the next kiwitrees upgrade (3.3.4)
While looking at your database you will also find these tags in the tables “xx_changes” (the log of changes to your family tree data) and “xx_gedcom_chunk” (part of the import process). Changes to these are not essential, and will not be touched automatically in the future release.
- The first (“xx_changes”) is up to you. It is a log file only, so not frequently used. If you want to change it, the SQL command would be similar to option 4 above, but you should (optional again) run it twice. Once for the column/field “old_gedcom” and once for “new_gedcom). If you use option 3 above, that table will be emptied anyway on re-import, so no longer an issue.
Option 2, above, will not change anything in this table.
- The second (“xx_gedcom_chunk”) can and should be ignored. In fact, you could empty and/or delete that table. It is ONLY used during import of a GEDCOM file.
15th December 2017 at 8:40 am #9658
Loads of GEDCOM errors which were not present until replacement file was uploaded:
Sorry, I should have mentioned this is also one of the outcomes of this error in the first post here. You can either apply a fix as described above or ignore these until the next upgrade.
- The topic ‘_WT_USER / _WT__OBJE_SORT bug’ is closed to new replies.