Jump to content
TNG Community
Ian Davidson

Media Import from Gedcom Errors

Recommended Posts

Ian Davidson

Hi folks,

I use Family Tree Maker (2017) & Ancestry but successfully host TNG (currently v.11.1.2) on my personal website, which is based around Wordpress. I recently decided to apply a long-overdue data update so exported the full file including media files to a Gedcom file. In TNG Setup | Configuration | Import settings I inserted the path on the PC to the FTM media folder, and in Setup | Configuration | General Settings set the TNG folder for all media types to the one folder, into which I then uploaded all the photo, document etc files using FTP.  I then imported the Gedcom file successfully into TNG. All the data looks good. However clicking on any media file generates a 404 - Page not found error. Hovering the mouse over the link shows the correct path on the website and file name, except that the url ends in "%0D", which is of course the hexadecimal notation for a carriage return character. If I manually remove the %0D from the end of the url the photo or document loads as expected. It's almost as if when TNG is parsing the Gedcom file it's not stripping the <CR> character from the end of the line, and saving it as part of the filename.

So my questions to the group are:

1) Am I doing something wrong, if so what?

2) What's the best way forward? 

Thanks for any help! Sorry if this topic has been addressed elsewhere but if so I couldn't find it :(




Share this post

Link to post
Share on other sites
Ian Davidson

OK, so I'm an IT person & although only having a barely passing familiarity with PHP I'm very comfortable with databases so (after making a backup of the database) I used PHPMyAdmin to export the tng_media table to a CSV file, with the option set to remove carriage return/line feed characters within columns. I then emptied (truncated) the table and imported the CSV file back into the same table. That worked a treat - all the media links now work correctly in TNG, so answered question (2) above, but it still leaves hanging why this happened in the first place - is it something I didn't do correctly or a bug?

Share this post

Link to post
Share on other sites

There's a setting in TNG for what it is expecting the line ending to be.

TNG Admin ------> Setup ------> General Settings ------> Miscellaneous ------> Line Ending.

That can be





depending on just what your software is writing out to the GEDCOM file


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now