Problem solved.
I just unchecked “Use the visual editor when writing” in my profile.
Rich
I’m having a similar problem and I don’t consider “turn off visual editor” to be a resolution. The person whose site I’m helping with needs to have the visual editor.
But it’s a little more strange than Rich’s problem. We did nothing with the site for several days and all was fine when we let it be. When she signed back in today, she noticed that the visual editor had changed! How odd is that considering we made not changes. It now shows drop-down for formatting text plus font color, underline and others. These were not showing before (and one of my working versions of 2.2.3 does not show them either).
Nothing happens when I click the ‘code’ tab. It won’t switch over. And when you enter and save a change using visual editor, it saves but when you check the Page and editor, nothing has changed.
* Deactivated all plugins – no change.
* Unchecked, Rechecked Use Visual Editor – no change
* Was going to re-upload includes folder but realized she needed to upgrade from 2.2.1 to 2.2.3 so went ahead and did the upgrade – no change. (does not want to go to 2.3 due to change in category tables)
ANY HELP?
TIA
Christy
Update: OK. Still don’t have answer, but using Firebug, I see a lot of wp-admin.css errors but also a few lines of the following error:
switchEditors is not defined
onclick(click clientX=0, clientY=0)
That definitely seems like it would cause problem of not being able to switch to code, but I don’t know how to resolve it.
???
Christy, I found a temporary fix:
- open wp-admin/admin-header.php with a text editor
- add the following somewhere inside the
<head>
tag:
<script type='text/javascript' src='<?php bloginfo('url'); ?>/wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js'></script>
This is a total hack, I am sure this is not the proper place to add javascript includes. wp-includes/script-loader.php appears to be the proper script to add this. I am hesitant to edit this file for several reasons. First, I have only been using wordpress for a week so I am not familiar with how it works under the hood. script-loader.php looks to be a critical file used throughout WordPress so I didn’t want to break other things to fix this problem. Finally, I don’t know what caused this to break. The editor worked this morning. I made several hours of changes to wordpress today before realizing that it was broken. I suspect a plugin may have caused this problem but who knows…
——————————————————–
In case it is of use to someone, this is what I did to troubleshoot the problem (wordpress 2.3.2) :
When trying to edit any post (new or old), the Code tab did not work. When it was clicked, I noticed two javascript errors (using firebug). As mentioned in previous posts, the error is: switchEditors is not defined onclick(click clientX=0, clientY=0)
I searched for the text switchEditors in every file included in WordPress 2.3.2. It only refers to a javascript function in wp-includes/js/tinymce/plugins/wordpress/editor_plugin.js
Viewing source for wp-admin/post.php reveals that the file: editor_plugin.js is not included in the <head> of the document. As a quick and dirty fix, I edited the header file for the posting pages: wp-admin/admin-header.php
Hope this helps.