The 404 error mod gives users a TNG error page instead of a blank page which may cause them to abandon your website. When the mod encounters an error, it sends a network 404 status code, displays a TNG page, creates a 404_error_log.txt file in the TNG folder with an error line message. The 404 error text file is created when an error occurs. If the error text file is deleted, it will be created when the next error occurs.

**Keep in mind the error log will capture pages when someone enters incorrect information in the URL. This can happen if someone tries to inject code in the URL. Fortunately Darrin has done a great job securing the TNG code. In any case if you do not want to use the error log simply change the mod option to disable it.

By default the mod displays a TNG page with 404 ERROR - PAGE NOT FOUND message in English using the active template. Additional languages and custom 404 page content can be displayed using the optional 404 Error Custom Page Mod. This mod adds a 404_page.php file in the TNG folder and modifies cust_text.php files. The defaults are; one Go Back button and two links to search for people and families. The button and links can be modified or commented out depending on preferences. The PHP file contains inline CSS, to customize the appearance.

To use the optional 404 page file, copy the 404_error_custom_page_v14.0.0.9.cfg file to the mods folder. When this file is installed the 404_page.php file is copied to the TNG folder and the language cust_text.php files are modified.

Languages modified are: Czech, Czech-UTF8, Danish, Danish-UTF8, Dutch, Dutch-UTF8, English, English-UTF8, Finnish, Finnish-UTF8, French, French-UTF8, German, German-UTF8, Italian, Italian-UTF8, Norwegian, Norwegian-UTF8, Polish-UTF8, PortugueseBR, PortugueseBR-UTF8, Spanish, Spanish-UTF8, Swedish and Swedish-UTF8.

If you want to change or add text messages, edit the 404_error_custom_page_v14.0.0.9.cfg file before installing or after uninstalling the mod. Failure to uninstall the mod before making changes can result in errors, corrupting the cust_text.php language files. To change or add links to the error page, edit the 404_page.php file. To make temporary styling changes or add links modify the HTML section of the 404_page.php file in the TNG folder, after the mod is installed. To make changes permanent, copy the edited 404_page.php file to the 404_file_v14.0.0.9 folder located in the mods folder so if the mod is reinstalled after an upgrade, your changes are retained.
WARNING - IF YOU ARE NOT FAMILIAR WITH EDITING PHP FILES DO NOT CHANGE THE LANGUAGE FILES. MAKING CHANGES CONTAINING SYNTAX ERRORS WILL CAUSE TNG TO MALFUNCTION RESULTING IN A BLANK DISPLAY SCREEN.


Using the 404_error_custom_page_v14.0.0.9.cfg file is optional and only needed to change the error message or add links to the error page. This is useful if the active template does not show the TNG navigation menu below the page header.

The 404_page.php file uses span instead of div. So if you remove all the breaks <br/>, the buttons will be appear inline. You can change spans to divs to use block level styling for a specific div or all of them.

If you change your mind and do not want to use the custom 404_page.php file, simply uninstall the 404 Error Custom Page mod. Note: manually deleting the 404_page.php file will not cause an error but will cause a partially installed notice in mod manager.
