I recently found, after updating to WordPress 3.4, that the visual editor had stopped working, for no discernible reason that I could think of.

After a lot of time spent trying to fix this issue, which involved deactivating all my plugins, renaming the plugin folder, changing theme, none of which produced any results, I eventually dived into the code to debug – the solution was ridiculously simple yet not at all intuitive.

I found that get_user_option( ‘rich_editing’ ) was not returning true, this confused me as I had already looked to make sure that it wasn’t disabled in my user profile, nevertheless I decided to double check.

I went to my user profile and sure enough “Disable the visual editor when writing” was unchecked, but following a hunch I ticked it, saved changes, unticked it, saved changes again and voila, when adding a new post, the visual editor works again.

Hope this helps someone else.