WPG2-popup-Navigator doesn't open correctly - fatal error

etan

Joined: 2007-08-29
Posts: 12
Posted: Tue, 2009-03-03 10:28

Hi eveyrone!

When I click on the "G2"-icon to insert an image in a post, the WPG2-pop-up opens and gives me the following error:

Quote:
Warning: main(/.../wordpress/wp-content/wp-includes/compat.php) [function.main]: failed to open stream: No such file or directory in /.../wordpress/wp-content/wp-settings.php on line 238

Fatal error: main() [function.require]: Failed opening required '/.../wordpress/wp-content/wp-includes/compat.php' (include_path='.:/usr/local/lib/php') in /.../wordpress/wp-content/wp-settings.php on line 238

In the 2nd line (Fatal error) the program tries to open the file wp-content/wp-includes/compat.php ... but this file doesn't exist!
The folder "wp-includes" is on the same level as "wp-content", it isn't a sub-folder ...

I suppose that the context of the pop-up is false, but I can't find how to correct it ...

Any idea what the problem can be?
I tried to delete the WPG2-files and to reinstall it, without success.

I'm using WP 2.7.1 and Gallery 2.2.5.

Thanks for your help!

 
etan

Joined: 2007-08-29
Posts: 12
Posted: Tue, 2009-03-03 11:15

I found a solution!
Perhaps not the better one, but it seems to work correctly ...

I saw in the file "wp-config.php" the following lines:

Quote:
/** Chemin absolu de WordPress vers le dossier WordPress. */
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/');

This path is not correct, because the file "wp-config.php" is NOT at the root of Wordpress but in the folder "wp-content".
So I corrected this line this way:

Quote:
if ( !defined('ABSPATH') )
define('ABSPATH', dirname(__FILE__) . '/../');

Then I became a second fatal error in the file "init.php" contained in the folder "wordpress/wp-content/plugins/wpg2/g2image" (so a file of the WPG2-plugin).
The following line was the problem:

Quote:
require_once($g2ic_wp_rel_path.'wp-admin/admin.php');

Here we have also the problem that the folder "wp-admin" is NOT a sub-folder of "wp-content", but is on the same level.
So I corrected this line this way:

Quote:
require_once($g2ic_wp_rel_path.'../wp-admin/admin.php');

And whith these 2 small changes, it works!
What I find really strange is that despite the fact I changed ABSPATH in the file "wp-config.php" I don't encounter any problem ...
Does it mean that this variable isn't used by wordpress itself, but only by plugins like WPG2?