Visual editor problems in WordPress

Today I ran into a problem on one of the sites I work on.

The problem was that the visual editor (TinyMCE) wasn’t working and showed a blank field.
The browser console had errors about failing to load styles and scripts. Here’s what it looked like:
Screenshot from 2015-08-26 13:20:24

All the needed files were sitting in the NextGen library plugin’s folder. With that plugin disabled the visual editor worked fine.

On the WordPress forums people complain about the ‘DIRECTORY_SEPARATOR’ function, recommend turning on script_debug.

Turned out the plugin has trouble finding the /wp-content folder

The fix is dead simple. Find this line in wp-config.php

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

And replace it with this:

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

Categories:

Updated: