GEDCOM Import Tips

TNG’s GEDCOM import tool is a very complex piece of software in its own right, and it has to co-exist with a variety of different server environments. As such, there are a number of common problems. For example:

  1. The import halts. Perhaps you were watching the progress bar and it just seemed to stop at some point. Two common reasons for that are 1) The server has a limit on how long a PHP script can run, and your import was taking too long; or 2) Something in your file threw the process for a loop and it didn’t know what to do, so it just stopped. The import is smart enough to try and start itself again when something like this happens, but it isn’t always successful.
  2. The complete progress bar just “pops” in at the end with the results. This probably means that your server is buffering the output. In other words, it’s saving what it has to put on the screen until it has enough of it to make the effort worthwhile. Until that happens, it could seem like it’s not doing anything. The import is actually finishing in this scenario, but the “progress” bar isn’t helpful.
  3. The progress bar never appears. This could also mean the server is buffering, but another possibility is that the import failed to start, maybe because the file is larger than what the server is allowing for uploads. For example, if the server says we’re not going to allow files larger than 2 Mb to be uploaded, the import might be allowed to go through the motions of uploading the file, but then when it finishes, the server pulls the rug out and deletes the file.
  4. The import finishes, but you’re left with zero records. I’ve only seen this a few times, and I’ve yet to be able to reproduce it, so if this happens to you and you haven’t discussed it with me already, I’d like to know. Basically the import looks normal until the very end, but when you go back to the menu, it reports zero for everything. It’s almost as if the import thinks it needs to start over and goes through the delete phase again.

So what can you do if one of these things happens to you? Here are some possible aids or remedies:

  1. Resume. If your import just halted and couldn’t restart itself, you could try doing it yourself. The progress bar window should include a “Resume” link, so if your import has gone more than a minute or so without doing anything, try clicking this link.
  2. Manual resume. If the link does nothing, or if you can’t see it for any reason (maybe the screen is blank or is showing you an error message), you can try resuming the import by “visiting” this direct URL: https://yourwebsite.com/admin_gedimport.php?tree=xxx&resuming=1 (of course you’ll want to substitute your own domain name, and switch out your own tree ID in place of “xxx”). This may “spin” for a while as the importing continues, but it might not provide any visual feedback. If the “page” finishes loading and the import still hasn’t finished, repeat this action.
  3. Open a different browser. In #2 above you might have been asking, “How will I know if the import is still going or not?” The best way is to open a different browser window. In other words, if you were doing the import in Chrome, now open Firefox or Edge. In the new window, browse to your Admin menu and observe the number of people, families and sources on your site. Now wait a few seconds and refresh the page. If at least one of the numbers changed, the import is still going. Refresh every so often as needed.
  4. Dev tools. If you right-click anywhere on the page, you should get a popup menu in which one of the options is “Inspect”. If you choose that, a new panel should open in your browser where you can see all kinds of developer tools and advanced data about the current page. For example, if an error has occurred, you may see that on the “Console” tab. You can also click on the “Network” tab to see communication between the import page and the server. Every few seconds TNG tries to ask the server for a progress report, so you can click on one of those events, then click on the “Response” column to see what came back (either data or an error).
  5. Old-style import. Years ago, the import reported progress by simply printing the number of imported records on the screen every time it passed a milepost (ie, every 10 records). Sometimes this still works better, usually because the increased output causes the server to fill its buffer more often and thus display the progress more reliably. If you want to try this, check the box in the lower right corner of the import screen before starting the import.
  6. Debug mode. If your server isn’t halting the import because it ran on too long, it could be that the program ran into an error. Perhaps a certain line caused a problem that threw the whole train off the track. In that case, running the import in debug mode might help. To do this, simply add “?debug=1 at the end of your import URL, like so: https://yourwebsite.com/admin_dataimport.php?debug=1. Once you load the page like that, select your file and options as usual, then start the import. Now if an error occurs, you should see it in an iframe in the bottom left corner of the screen.
  7. Ask your hosting provider. If the import can’t upload the file or can’t finish the process due to a server setting, you can always try contacting your hosting provider to ask if they will adjust the settings for you. For example, the setting that controls the amount of time allowed is max_execution time, and the ones that control how large an uploaded file can be are upload_max_filesize and post_max_size. They may not want to help with that, but might be worth asking. 🙂

“Default” photos

TNG lets you choose a particular thumbnail photo for each person that will then be shown on all charts and next to that person’s name at the top of all their pages. That is referred to in TNG as the person’s “Default” photo. So how do you do that?

First, make sure you have at least one photo linked to that person, and that a thumbnail has been created for that photo. You can do that as you upload photos one at a time, or you can create thumbs for all your photos using the Generate Thumbnails tool under Admin >> Media >> Thumbnails.

Once a person is linked to at least one photo, there are a variety of ways to select that person’s Default photo:

  1. After searching for an individual to link to a photo, check the “Make Default” option next to that individual in the search results.
  2. After the media link has been created, check the box next to that link under the “Default” column in the Media Links section of the Edit Media page.
  3. Edit the media link, then check the “Make Default” option in the popup and save.
  4. After searching for an individual under Admin >> People, click the box next to that name that says “Choose default photo”, then on the next page mouse over the entry for that photo and click the “Make default” option. If you don’t see that “choose” box, then the person has no photos linked to them, or the person already has a default photo (and you’ll see it there).
  5. After editing an individual under Admin >> People, click the same “choose” box next to the person’s name.
  6. On the Admin >> Media >> Sort page, enter the person’s ID or search for it, then click “Continue” and choose the default photo the same way you did in the previous options above.
  7. Use the Assign Defaults utility to make sure everyone with at least one photo has a default (see below).

But if you want to save yourself some time, you might investigate the Admin >> Media >> Assign Defaults utility first. That tool will automatically designate the first photo for everything individual as that person’s default photo (unless they already have one).

The Assign Default Photos utility

The “OG” TNG users (those of us who have been here a while) will also remember an “old” method for designating defaults. That method is no longer mentioned on any of the TNG Admin pages, but you can still use it. Here’s how it works:

  1. Create your own thumbnail for a person.
  2. Name it according to this convention: tree.personID.jpg. So for example, if your tree has an ID of “tree1” and your person has the ID of I12345, then you would name this image tree1.I12345.jpg.
  3. Now use an FTP program or your cPanel file manager to upload this photo to the “photos” folder on your site.

So what if you don’t see any of the options to create thumbnails or assign default photos? If that’s the case, it means that your PHP has been configured without support for the GD image library. Visit your cPanel, then open the PHP version tool and look a the configuration page there. If the GD box is unchecked, simply check it and you’re good. If you don’t see it, you may need to ask your hosting provider if GD is supported and if they can enable it for you.

Supporting multiple languages

You may not realize it, but people from other parts of the world may be accessing your site. Wouldn’t it be great if those people could read your site in their own language? Actually, they can! TNG has already been translated (at least in part) into almost 30 different languages. In just a few easy steps, you can configure your site to be readable in some or all of those. Here’s how:

  1. Make sure you have dynamic language changing turned on. To do that, go to Admin >> Setup >> General Settings >> Language and make sure Dynamic Language Change is set to Allow, like so:
  2. Take note of your Language folder and Character set. Those are your default settings, and you’ll need them in the next step. And while we’re here, those two things should be compatible. In other words, if you’re using UTF-8 as your character set, then you should also be using the UTF-8 version of your preferred language folder. By the way, I recommend you all use UTF-8 if you can, especially if your data includes special characters, like à ê ǐ ö ů or similar.
  3. Create language records for each language you’d like to support. You can do that under Admin >> Languages >> Add New. The first record you create should be for your default language. If you don’t add one for that, you won’t be able to switch back! Be sure to choose the same language folder and character set for your default language as you saw in the settings above, and give it a name that will be recognizable to speakers of that language (like “English” or “Norsk”).
  4. Repeat that process as needed. At the end, you should have a list of the records you created:
  5. Add translations for your template messages. This is optional, but if you also want to provide specific translations for each of the custom messages you’re using on your home page or in your custom header, you can do that from Admin >> Setup >> Template Settings. Each of the translatable messages there will have a “Create copy in” selection box to the right of the existing message. Choose a language (all the choices will be ones you created above), then click “Go”. Now you’ll see a new field right below that for the new translation, like this: Just add your translation there, then repeat this step for as many other languages as you’d like (if you skip one, the default language translation will be used for this language too). When you’r done, don’t forget to save!
  6. Add translations for your Event & Attribute Types. Just like with the template messages, you can also provide translations for any of your custom event types. To do that, go to Admin >> Event & Attribute Types, then find and edit the type you want to translate. Now you should see a spot for “Other Languages”. Expand that area and add translations for this type for as many of your supported languages as you want. Any that you don’t supply will use the default translation.

When you’re done adding languages and translations, you should see a dropdown box on most public pages and on the Admin main menu that you can use to change the current language. When you choose a new language, that language is stored in a cookie so TNG can remember your preferred language the next time you visit.

That’s all! Be sure to let the users of your site know about this feature!

Image Tags

Did you know you can “tag” people in your TNG photos? This is a very helpful feature when more than one people are in the picture, as it helps visitors quickly determine who is who. Here’s what that looks like:

TNG image tags, as seen by a public visitor.

Note how each person has a box around their face, along with the name directly underneath. Also, each face and name is a link back to that person’s page.

I should also say that the boxes are not visible initially. I made them all visible at once by clicking the “Toggle Tags” button near the top. Clicking that button again hides all the tags again.

New in TNG v15 is the box in the upper left, which becomes visible after clicking the “Show tags” button in the middle. That shows all the people who are tagged, but does not reveal those tags. Visitors can reveal the tag areas one at a time by clicking on the names in the list box (or turn them off in the same way). When a tag is hidden, a visitor can also reveal it by holding their mouse pointer over the tag area. Try it!

Tags are added in the TNG Admin area. Starting from Admin >> Media, look up and edit any image there. Then on the Edit Media page, scroll down to the “Image Tags” section and click the title to expand the area.

Creating image tags under Admin/Media.

Now you’ll see the image, with an explanation of how to create new tags and how to move or delete existing ones. To create a new tag, just hold your mouse pointer (now a crosshairs) over the image, then press and hold down your left mouse button and drag down and to the right to create a box, then release.

At that point a popup will appear where you can search for someone by name (or part of a name). When you see the right person, click their name to select and link that person to the new tag.

And take note that you can also link families, sources, repositories, source citations, and places to any spot in the image. Or…you can enter any text next to “Title” at the top, along with any URL as the destination.

Easy, right? Fun too! Plus, your relatives will think the result is very cool (once you convince them to come to the site, that is…am I right?).

Version 15 Upgrade Notes

Thanks to all who helped make the v15 upgrade a success, and thanks also to everyone who has already downloaded and installed the new version. I’ve heard lots of good comments!

As I’ve helped install the upgrade for many of you, I’ve come across a few common situations that I thought I’d mention for the benefit of those who haven’t yet taken the step:

  1. The database step shows an error and nothing works. This usually means that you’re still running an older version of PHP. TNG v15 requires at least PHP 7.4, and I recommend going even higher if you can (8.0+). Most of you will be able to upgrade your PHP from the site control panel (or “cPanel”), or you can ask your hosting provider. If things still don’t work after upgrading PHP, look at the PHP config screen and make sure the following boxes are all checked: gd, mbstring, mysqli.
  2. The admin home page won’t come up. If the rest of the site works but the admin home page returns an error, it could be related to some changes with the Mod Manager (because of the counter there that shows how many mods you have, even if you have none). Here are the troubleshooting steps I take when I encounter this:
    • Make sure PHP has been upgraded (see above).
    • Install the 15.0.1 upgrade, as that includes a few fixes for the Mod Manager.
    • See if you have a file called version.php in the classes folder. If so, delete it.
    • Do you have an mmconfig.php file in the main TNG folder? If not, or if the file is there but isn’t writeable, that could be the issue. You can find this file in the v15 full version zip.
    • Is the Root Path still correct? Sometimes this can change without notice from your provider. Go to Admin/Setup/General Settings/Paths & Folders and blank out the Root Path, then save (TNG will now determine the correct path dynamically). But how do you get there if you can’t get to the Admin menu? Just go directly to admin_setup.php to get to the Setup page. It’s only the admin *menu* that doesn’t work in this situation.
  3. Menu options missing. TNG v15 now allows you to turn off individual menu options. If you didn’t do that but some are missing, go to Admin/Setup/General Setting/Menu to turn them back on. You can turn off media categories you’re not using by running the “Trim Media Menus” utility under Admin/Utilities/Post-Import Utilities.
  4. Everyone is marked as “Living”. Go to Admin/Setup/General Settings/Privacy and change the “Show living data” option from “Never” to “Depending on user rights”. The “Never” option there did not do what most people expected, so I removed it. Sites that had “Never” selected anyway might find themselves in this situation. The “Depending” option is what you wanted anyway. 🙂
  5. Google Maps show an error on top of the maps. This isn’t actually a result of the upgrade, but I’ve noticed it enough to say something. If you see the maps but there’s a message on top that says the maps are “for development purposes only”, that means that Google wants you to link a credit card to your Google account. They won’t charge you for using the maps unless you request an astronomical number of maps in a month, so there’s not much to worry about there.

Illegal mix of collations error

Tables and columns in a MySQL database are created with a “collation”, which dictates what characters can be used in the information. When new tables or columns are added to your TNG database during an upgrade, the database will use its default collation to create those. Normally that’s what we want, but if your default collation has changed since your tables were originally created, then you could end up with a mismatch that MySQL doesn’t like. That when you’ll see this message like this on your TNG site:

Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (utf8mb4_general_ci,COERCIBLE)

To fix this, you’ll need to edit your database structure and fix the mismatch so that everything is using the same collation.

Start by opening phpMyAdmin on your site control panel (aka, the “cpanel”). Ask your hosting provider if you need help finding it (it’s not part of TNG).

Once you’re in phpMyAdmin, select your database by clicking on it in the left column. You should now see all the tables in the database on the right, and one of the things listed for each table is the collation. Scan the list and take note of the predominant collation (the one used the most).

Next, click the Operations tab at the top of the page. In the Operations window, look for the Collation section near the bottom. It looks like this:

Now use the dropdown list to select the predominant collation you noticed earlier, then check the boxes below to propagate the collation to all tables and columns:

Finally, click “Go” in the lower right corner to make the change.

Uploading folders with “replace” vs “merge”

One problem TNG site owners sometimes have during an upgrade is discovering that some images or other files are missing when the upgrade is complete. How did that happen?

The cause of this trouble is folders that get uploaded in “replace” mode (as opposed to “merge” mode). When a folder is uploaded in “replace” mode, the new folder totally replaces the old folder, so if there were any files not included in the new folder, those files will end up getting deleted from the website. In contrast, uploading in “merge” mode will allow the new files to overwrite older files with the same names, but it won’t delete anything.

So how do I know when my FTP program is in “replace” or “merge” mode? Unfortunately there’s no definitive answer, since all programs are different, so you might have to hunt around in your settings. In the popular Mac program “Transmit”, this can be found under Settings and then Transfers:

In that image, notice the “Uploading folders” option at the bottom. Here’s what it looks like with the options open:

There you can see that you have both a “Replace the existing folder” option and a “Merge the existing folder” option (among others). If you use a different program, you will likely have a similar option. Ask the company that makes the software if you’re not sure where to find it.

If you do end up replacing a folder when you didn’t mean to (and thus end up deleting some files), you can get them back by downloading the TNG full version zip and then uploading the folder again from there. That should restore all the default files from that folder for the current version. If you had custom images or files that were removed from the folder in question, you will need to upload those again as well.

Tips for a successful v15 upgrade

With the release of TNG 15, I thought I’d once again take a minute to go over some of the things to watch out for while you’re upgrading your site. All of these apply no matter which version you’re installing.

  • Make sure you choose the right upgrade. Before you begin, go to your TNG Admin menu and look at the top of the screen. It should say there what your current version is. Anything that starts with “14” (like 14.0.1 or 14.0.6) counts as “14.x”. You will see links for several different upgrades on the v14 downloads page. Be sure to get the one most appropriate for your currently installed version. If you install the wrong upgrade, you will likely notice errors when you’re done.
  • Install the upgrade, not the full version. When you get to the v15 downloads page, the first links near the top will be for brand new TNG users. What you want is a little further down in the Updates section. Look for the upgrade most appropriate for your currently installed version, then look next to the download link for the name of the file that will include the upgrade instructions. Note: A new version of the full version “readme.html” file will also be included with your upgrade, but you can ignore that since you’re upgrading. If you accidentally open that file, it should warn you that you’re about to install the full version. If you see that, go back! Installing the full version on top of an existing install will cause you to lose your data and your customizations.
  • Don’t forget the backup. At the top of the instructions, you’re advised to back up your key files (mainly the configuration files, like config.php, pedconfig.php, etc., but also any others that you may have customized) and your database tables. If you do make a mistake at some point, having a backup can save you a lot of headaches. Once the upgrade is finished and everything is running smoothly, back up your tables again. If you’ve already done this recently, you should be good.
  • Remember to view the upgrade readme from your browser, not your home computer. One of the first steps is to upload the files to your site. After that, you need to load the instructions again from your site. In other words, if your site is www.mysite.com and you’re upgrading from 14.0.1, open your web browser and go to http://yoursite.com/readme14x-15x.html from there (“yoursite.com” is just an example…use your own site name). If you continue with the local copy you opened immediately after downloading, some of the later steps won’t work.
  • Update your template. For most people, this should be simple. If you’ve never tinkered with the HTML or PHP in your template files, just upload the entire “templates” folder from the upgrade and that’s it. If you have made any customizations (not the Template Settings or the mytngstyle.css style sheets) and you want to keep those, then you’ll probably want to merge your changes into the latest files instead of just uploading those new files. Some of the newest updates may not work unless you’re using the latest template files.
  • Watch for the twist. Large upgrades usually include a step to update your database table structures, but a lot of people miss it and then wonder why things are broken. This time the database update step directs you to visit the TNG Admin menu on your site, where you’ll be given the next steps. If you skip those, you’ll be reminded again each time you visit the admin area. Don’t forget to click the final link to delete the upgrade files when you’re done (the upgrade page will still show until that happens).
  • Clear your browser cache. Once you’re done, go into your browser settings or preferences and clear the cache (or “temporary Internet files”). Until you do that, your browser might decide to hang on to some of the old pages, and that could present a conflict. Some features might not work. The instructions for clearing the cache vary from one browser to another, so do a Google search on this if you’re not sure how to do it.

Tips for a successful v14 upgrade

With the impending release of TNG 14, I thought I’d take a minute to go over some of the things to watch out for while you’re upgrading your site. All of these apply no matter which version you’re installing.

  • Make sure you choose the right upgrade. Before you begin, go to your TNG Admin menu and look at the top of the screen. It should say there what your current version is. Anything that starts with “13” (like 13.0.1 or 13.1.2) counts as “13.x”. You will see links for several different upgrades on the v14 downloads page. Be sure to get the one most appropriate for your currently installed version. If you install the wrong upgrade, you will likely notice errors when you’re done.
  • Install the upgrade, not the full version. When you get to the v14 downloads page, the first links near the top will be for brand new TNG users. What you want is a little further down in the Updates section. Look for the upgrade most appropriate for your currently installed version, then look next to the download link for the name of the file that will include the upgrade instructions. Note: A new version of the full version “readme.html” file will also be included with your upgrade, but you can ignore that since you’re upgrading. If you accidentally open that file, it should warn you that you’re about to install the full version. If you see that, go back! Installing the full version on top of an existing install will cause you to lose your data and your customizations.
  • Don’t forget the backup. At the top of the instructions, you’re advised to back up your key files (mainly the configuration files, like config.php, pedconfig.php, etc., but also any others that you may have customized) and your database tables. If you do make a mistake at some point, having a backup can save you a lot of headaches. Once the upgrade is finished and everything is running smoothly, back up your tables again.
  • Remember to view the upgrade readme from your browser, not your home computer. One of the first steps is to upload the files to your site. After that, you need to load the instructions again from your site. In other words, if your site is www.mysite.com and you’re upgrading from 13.0.1, open your web browser and go to http://www.mysite.com/readme13x-14x.html from there. If you continue with the local copy you opened immediately after downloading, some of the later steps won’t work.
  • Update your template. For most people, this should be simple. If you’ve never tinkered with the HTML or PHP in your template files, just upload the entire “templates” folder from the upgrade and that’s it. If you have made any customizations (not the Template Settings or the mytngstyle.css style sheets) and you want to keep those, then you’ll probably want to merge your changes into the latest files instead of just uploading those new files. Some of the new features may not work unless you’re using the latest template files.
  • Watch for the twist. Large upgrades usually include a step to update your database table structures, but a lot of people miss it and then wonder why things are broken. This time the database update step directs you to visit the TNG Admin menu on your site, where you’ll be given the next steps. If you skip those, you’ll be reminded again each time you visit the admin area. Don’t forget to click the final link to delete the upgrade files when you’re done (the upgrade page will still show until that happens).
  • Clear your browser cache. Once you’re done, go into your browser settings or preferences and clear the cache (or “temporary Internet files”). Until you do that, your browser might decide to hang on to some of the old pages, and that could present a conflict. Some features might not work. The instructions for clearing the cache vary from one browser to another, so do a Google search on this if you’re not sure how to do it.

TNG 14: Feature Preview

TNG 14 is almost here! This major upgrade includes more than 100 enhancements, fixes and new features. Here’s a quick summary of the most significant changes:

  • Import: The inner workings of the GEDCOM import have been improved to make the process much more robust. Unresponsiveness issues have been addressed, and “resume” operations should be seamless. Also, support has been added for some GEDCOM 7.0 features. Media included with a zipped GEDCOM file can now be extracted at the time of import.
  • Admin Home Redesign: The look and feel of the Admin home page has been modernized. Menu items are larger, and excess text has been removed. The redundant left-side menu has been removed, and rotating banner images display at the top. The number of mods installed is also now visible on the Admin home page.
  • Connections: The Relationship tab has been supplemented by an advanced relationship/connection search, powered by the Connections mod (by Michal Jarocinski). This will allow you to quickly find more connections between two individuals, including those that include one or more marriages/pairings along the way.
  • Style Upgrades: The size and font of most form fields has been increased to 14px. Rounded corners and extra padding have been added to most tables, and a drop shadow has been added on some tables. These and other elements combine for a softer, more modern look and feel for all pages, both public and admin.
  • Media: Several here too, including: 1) Image tags may now point to places, families, sources, repos and citations (in addition to people). The tree selection defaults to either the tree assigned to the image or the one used for already existing media links. 2) Image tags can also be just a label (any text or name), which can optionally point to any URL. 3) DOC and DOCX files can now be viewed inline instead of being automatically downloaded (based on Michel Kirsch’s “Office Viewer” mod).
  • Search: The submit button on the Advanced Search page is now fixed so you never have to scroll to find it. Most search fields have also been widened, and the “Other events” list starts off as collapsed, but the form remembers ones you have used before and sorts those at the top.
  • Descendant Tables: Jim Graham’s Table of Descendants mod has been incorporated. Visitors will see a “Tables” option on the Descendants tab. Click through to see a tabular list of all descendants for a particular individual. Choose any row to instantly list all individuals from that generation.
  • Charts: Zoom and drag functions have been added to several more charts. Also, birth and death years are now displayed on the fan chart.
  • Report Generator: The report builder interface has been redesigned to be more modern, easier to use, and more functional on mobile. The Custom SQL box has also been enlarged.
  • Backups: Backups can now be created as SQL files (the old method will still be supported). They can also be downloaded with a download icon. Backups may also include DROP and CREATE table directives. A restore operation may be made to drop all existing records or not.
  • Additional Genders: Other gender choices can now be entered on the Admin/People pages.
  • Alternate Birth Events: A list of acceptable “alternate birth event types” can now be maintained in the settings, and users may choose the alternate birth event for each individual from the Edit Person page.
  • Mod Manager: Many improvements, including 1) The source code has been restructured to improve the Mod Manager internal structure. New diagnostic error prefix is included on messages in Mod List. 2) Michel Kirsch’s “Analyze only install mods” mod has been incorporated. 3) A fixed-position header now applies to all screens and includes the table column header line.
  • PHP Compatibility: Pro-active changes will make sure TNG remains compatible with the latest versions of PHP and MySQL.

You will be able to get the upgrade at a discount by going back to your previous downloads page after the release is officially announced. If you’ve lost the URL or access info, send me a message at darrin@lythgoes.net and I’ll send it to you again. If you purchased TNG 13 or the v13 upgrade at any time in the six months prior to the upgrade release date, you’ll be eligible to get the upgrade for free. Information on that will be sent out in the next few days to those who are eligible.