Jump to content
TNG Community
Sign in to follow this  
Ron Teunissen

Error found in source code TNG Plugin for WP but still not working...

Recommended Posts

Ron Teunissen

Hi,

I've started to integrate TNG on my website and encountered to my surprise a fatal error after installing the plug-in, reading the instructions thrice and making my site unreachable. After some minor tweaks and disabeling the plugin I searched for why the fatal error occured. As the error was nicely reported via my website email it turned out that in the source code on line 367 there were two single quotes missing, if that is the correct word for them, in regard to the variable mbtng_url_to_admin, see line below:

echo "<td width=\"200\"><p class=\"submit\" style=\"padding:0\"><input type=\"submit\" name=\"GoToAdmin\" value=\"Go to TNG Admin\" onclick=\"newwindow=window.open('" . get_option(mbtng_url_to_admin) . "')\" style=\"margin-right:1em\"/></p></td>\n";

I changed that to: get_option('mbtng_url_to_admin') and no critical error anymore.

I am now able to open the admin page from the WP-plugin but alas not from my website.

Is there anyone with the same issue?

Using WP 5.8.2 and TNG 13.1 by the way and am a newbie to WP.

Share this post


Link to post
Share on other sites
theKiwi

Thanks for letting me know about this - must be a new error caused by using PHP 8 - is that what your site is running?

I've fixed that, and checked the code that there are no more like that, and will publish it to the WordPress repository as an update shortly.

I'm not sure what you mean by 

3 hours ago, Ron Teunissen said:

I am now able to open the admin page from the WP-plugin but alas not from my website.

The path to TNG Admin should be the path that bypasses WordPress - to for example your site.com/tng/admin.php

not invoking the WordPress path. To ensure that this happens, you could put this code into the .htaccess file

# To get TNG Admin pages to open in /tng/ not in /Genealogy/
RewriteEngine On
ReWriteRule ^genealogy/admin(.*)$ tng/admin$1 [R,L]

Where "genealogy" is whatever you've called the page that WordPress puts the TNG content on to, and "tng" is the folder that TNG is in.

Roger

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
Sign in to follow this  

×