Wrong path is used to load NextGen Gallery assets

1.6k Views Asked by At

On my Wordpress website, when I go to the admin area and edit a page, all NextGen Gallery assets are loading from an incorrect path and hence 404ing.

For example the following files:

Notice how it says example.comwp-content where it should be example.com/wp-content

example.com is just a dummy name that I replaced with my real domain name.

What I've done so far with no success:

  • Deactivated other plugins
  • Turned error reporting on

These are the values from my wp-config.php file:

  • define('WP_HOME', 'http://' . $_SERVER['HTTP_HOST']);
  • define('WP_SITEURL', 'http://' . $_SERVER['HTTP_HOST']);
  • define('WP_CONTENT_URL', '/wp-content');
  • define('DOMAIN_CURRENT_SITE', $_SERVER['HTTP_HOST']);

More Details:

  • Wordpress Version 4.0.1
  • NextGen Gallery version: 2.0.66.33
  • NextGen Gallery Pro version: 2.1.4
1

There are 1 best solutions below

0
On BEST ANSWER

From the Codex:

Set WP_CONTENT_URL to the full URI of this directory (no trailing slash), e.g.

define( 'WP_CONTENT_URL', 'http://example/blog/wp-content' );

So if you define your own WP_CONTENT_URL, you must use the full path. I'd say you should be using:

define('WP_CONTENT_URL', WP_SITEURL . '/wp-content');

Although, that's the default anyway, isn't it? So probably just removing that line would fix things.