Notes on NAVT 1.0.28 and 1.0.29

Since the release of WordPress 2.7, people now have the ability to install WordPress in ways that make it difficult for the NAVT plugin to determine the location of the WordPress file wp-config.php. The ajax portion of NAVT includes the wp-config.php file so it can use all of the features and functions provided by the WordPress core code. If NAVT can’t find the file because the WordPress installation isn’t where it would normally be located (in the root directory) OR the WordPress wp-content directory is NOT located inside the WordPress installation directory then NAVT has no chance of working correctly.

Several people have offered solutions for the PHP include statement that is used to include the wp-config.php file and some of the code has been published in comments on this site. I didn’t make change to the plugin until recently… I just haven’t had the time. In version 1.0.28, I decided that instead of attempting to include the wp-config.php using a relative path from the location of the NAVT installtion directory – I would simply create a file on the fly that contained the name of the Word Press installation directory. NAVT knows the name of the installation directory but the ajax code in the plugin does not. The new file is called wp-root.php and it is created/located in the directory where NAVT is installed. The file is created only once and only when NAVT realizes it doesn’t exist. The ajax portion of NAVT includes the wp-root.php file to obtain the name of the WordPress installation directory.

Version 1.0.29

In version 1.0.29, I decided to add a code to ensure the NAVT installation directory had writable permissions and then change the permissions back to 0755 after the file was created. If the file cannot be created for some reason, the plugin will not work. If you do not see the NAVT Lists Tool item in your WordPress dashboard try changing the NAVT installation directory permissions to 0777 using your favorite FTP program or your web site dashboard application. Go to your web site using your browser then using your FTP program or web site file manager, look for the wp-root.php file in the NAVT installation directory. If it exists then change the directory permissions to 0755. If it doesn’t exist then the directory did not have the correct permission settings – try it again.

5 Responses to “Notes on NAVT 1.0.28 and 1.0.29”


  1. 1 Audi

    1.0.28 and 1.0.29 didin’t work on my typicaly installed wordpress. So i edited js/navtadmin.js.php file:

    On the top you should have:

    if(!defined(‘ABSPATH’)) {
    define(‘ABSPATH’, $_SERVER['DOCUMENT_ROOT'] . ‘/’);
    }

    Replace it with this:

    if(!defined(‘ABSPATH’)) {
    define(‘ABSPATH’, dirname(dirname(dirname(dirname(dirname(__FILE__))))).’/');
    }

    it helped me. Maybe it will help someone else. Or maybe you shoud test it and place it in 1.0.30 ?

    Regards,

    M.

  2. 2 Greg

    Thanks for that.

  3. 3 Clayton

    Your wordpress navigation plugin sounds great. I would like to see it in action. Can you email me several site url’s that use it? Or maybe someone can post a few examples here without having their link considered as spamming. Thanks!

  4. 4 Greg

    This site uses it but you can only see it “in action” in the backend. I don’t have demo site – it’s a little difficult to “demo”.

  1. 1 Version 1.0.30 | Atalaya Studio
Comments are currently closed.