Be Ianspired – ee-uhn, ee-ahn, ahy-uhn and much more
Header

Delicate dun goof’d.

April 24th, 2011 | Posted by Ian Lai in Web Development

Tutorial: Fix for ‘WordPress 3.1.1 Visual Editor Not Showing Up’ (NattyWP’s Delicate Theme) / Debugging for Problems

Why, hello there!

Just yesterday I was trying to create a new ‘rant-like’ blog post, however, my WordPress simply refused to display the What-You-See-Is-What-You-Get (WYSIWYG) / Visual / Rich-text / Whatever you want to call it, editor. Therefore, I was unable to create any blog post… and as crazy as it seems, perhaps this was the Universe telling me, “You have more important things to do that rant about something so silly.” As this was the first time I had ever experience such problem with WordPress (upon numerous others), I had to Google for answers which brought me to various irrelevant WordPress 2.8.x related posts. After a while, I was able to isolate and fix the issue. Now, I can successfully post!

Whilst I was searching for answers, I came across a post on the WordPress forum that recommended enabling WordPress in ‘debugging mode’ in order to look for errors (which was far more useful than all the other posts advising I cleared my cache before trying). So, if you are ever faced with this problem the first thing you should do is open up ‘wp-config.php’ (it should be in the base WordPress directory) and look for:

define('WP_DEBUG', false);

Set this to true to enable your WordPress in debugging mode. Then, the next thing you should do is to return to your “Add New” post page and look for errors. In my case, majority of the errors were coming from my theme – NattyWP’s Delicate – which suggests to me, that perhaps it is not compatible with the latest WordPress 3.1.1. The errors identified ‘custom-title.php‘ as the main source of the problem – you can find this file at ‘/wp-content/themes/delicate/functions/custom-title.php.’ Open this file up and look for:

add_action('admin_menu', 'seo_meta_box');
add_action('save_post', 'seo_metabox_insert');

Now, there’s 2 things you can do here at this point.

  • (a) You may decide to fix the error which is due to $pID attempting to access a non-object $post or,
  • (b) You may comment the 2 aforementioned lines out and resolve your problems immediately.

As I already have the “All-In-One SEO Pack” plugin installed, I found the need for another “SEO-related box” in my post creation page, unnecessary. Once you comment it out or fix the issue here, your visual editor should work once again.

Conclusion

Whilst I was attempting to fix this, my first few attempts at isolating the problem led to a few of the following conclusions:

  • It was due to a faulty WordPress upgrade.
    Not Possible – I replaced all the WordPress 3.1.1 files.
  • It was due to $ / jQuery not being defined.
    Not Possible – The script tag for the jQuery library is declared right above every other essential JavaScript files. Thus, jQuery should have been loaded before every other script.
  • It was due to a plugin.
    Not Possible – I disabled all my plugins and it still did not work.
  • It was due to stale cache / Gears.
    Not Possible – Yes, I have Gears enabled but even so, the visual editor did not appear when accessing the “Add New” post page on Google Chrome Incognito.

Therefore, the only thing left must be themes. If you are ever faced with a similar problem, ensure you have checked all of the above as well as your theme!

WordPress is clearly not something entirely familiar to me yet and even the discovery of the “debugging mode” in WordPress was something new to me. I do apologise if this article was a bit too simplistic for your level, however, I am writing this merely to assist anyone facing a similar issue as me. As I am satisfied with this theme, I’m not too keen on changing it so I can post again, but fortunately, I was able to resolve this issue and stick with this unique and contemporary theme. Don’t change it until you can’t fix it!

If you like this theme, click here to download it.

Have a nice day!

Ian Lai

You can follow any responses to this entry through the RSS 2.0 You can leave a response, or trackback.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">