Title: Broken Visual Button, stuck at Code Button
Last modified: August 19, 2016

---

# Broken Visual Button, stuck at Code Button

 *  [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/)
 * This is what happened to me, on all my 3 wordpresses:
 * [http://hellgate.vault.ign.com/drivinginsane.jpg](http://hellgate.vault.ign.com/drivinginsane.jpg)
 * It doesnt matter how many times I click on the Visual button… it is just DEAD…
   I am stuck with the code tab forever… (see image).
 * I have three sites with different templates, and they are all with the same problem.
 * **What have I done:**
 * **1- **Loged out, loged in, Turned On and Off the profile option to use and not
   use the enhanced editor.
    **2- **Cleared my browser cash, even tested on different
   computers. Tested on Opera, Firefox, IE 6, IE7 and Safari. All the same. **3-**
   Searched on this forum, and nothing helps me on fixing. **4- **Re-Sent ALL the
   files from the latest WordPress 2.3.1 version and replaced all the files, and
   even that did not fix. **5- **Changed my Templates for the classic template and
   the other default template, and they are the same…
 * **6- It was working perfectly for a month after I installed the WordPress. Then
   the Visual tab died, so I updated to the latest version 2.3.1 and the Visual 
   editor was fixed… Then again, after a few weeks… BAM… I got Stuck again.**
 * I run out of ideas… there has to be something you guys can do, help!!! Please!

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/page/2/?output_format=md)

 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670269)
 * I even looked at the code myself (I know intermediary php), and can’t find anything
   to work…
 * I even changed the button style to see if it was it.. weird stuff
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670284)
 * I am getting somewhere now, after wasting the entire day, I got this error from
   IE 7:
 * Line: 218
    Char: 1 Error: Object expected Code: 0 URL: [http://myblog.com/wp-admin/post-new.php](http://myblog.com/wp-admin/post-new.php)
 * This one came up when I deleted everything from my server, re-uploaded the wordpress
   files and then, opened on a cash clean IE 7.
 * I AM using the Visual tab now, but the buttons are missing (Bold, align etc),
   so, it is some kind of advancement ^^
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670286)
 * New error:
 * Line: 100
    Char: 2 Error: Object doesn’t support this property or method Code:
   0 URL: [http://myblog.com/wp-admin/post-new.php](http://myblog.com/wp-admin/post-new.php)
 * Line: 184
    Char: 713 Error: Unterminated string constant Code: 0 URL: [http://myblog.com/wp-admin/post-new.php?posted=49](http://myblog.com/wp-admin/post-new.php?posted=49)
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670287)
 * Line: 44
    Char: 2 Error: ‘realTinyMCE’ is undefined Code: 0 URL: [http://myblog.com/wp-admin/post-new.php?posted=49](http://myblog.com/wp-admin/post-new.php?posted=49)
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670337)
 * I think the best solution for anyone havint this problem is to back up to the
   version 2.3. I am running that version on another WordPress site and it works
   like a charm.
 * Once they fix this bug of the Visual tab disappearing, we can update back to 
   2.3.1
 * Spent two days trying to work it out, but there is nothing I could do to fix.
 *  [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * (@azaozz)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670344)
 * Can you try Firefox + Firebug and see exactly what’s breaking? Sounds like weird
   cache issue… Maybe not the browser cache, but a network cache somewhere between
   you and your host. Or your antivirus/antispyware/anti-whatever interferes with
   the js.
 * BTW 2.3 has exactly the same editor configuration as 2.3.1.
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670416)
 * > Maybe not the browser cache, but a network cache somewhere between you and 
   > your host.
 * You could be correct, I have two WordPress blogs on the server “a”, and one wordpress
   blog on yahoo. The only one that works correctly is the yahoo one, being version
   2.3
 * The other two on the other server “a”, both have the visual tab problem, both
   version 2.3.1
 * PS: A new stable version is out, this will fix, I hope ^^
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670417)
 * Here goes Firebug errors:
 * When I click on the Visual tab, nothing happens, but this errors appears on the
   console:
 *     ```
       switchEditors is not defined
       onclick(click clientX=0, clientY=0)
   
       switchEditors is not defined
       http://x.com/wp-admin/post-new.php
       Line 1
       ```
   
 * Just by loading the “write post” page, I get these errors:
 *     ```
       realTinyMCE is not defined
       onLoad()tiny_mce_gzip.php (line 43)
       [Break on this error] tinyMCE = realTinyMCE;
   
       realTinyMCE is not defined
       onLoad()tiny_mce_gzip.php (line 43)
       [Break on this error] tinyMCE = realTinyMCE;
       ```
   
 * Error 2:
 *     ```
       unterminated string literal
       [Break on this error] /www.w3.org/1999/xhtml"><base href="' + tinyMCE.settings.base_href + '" /><title...
   
       unterminated string literal
       http://x.com/wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20070528&theme=advanced&language=en&plugins=inlinepopups%2Cautosave%2Cspellchecker%2Cpaste%2Cwordpress&lang=en&index=0
       Line 183
       ```
   
 * Error 3:
 *     ```
       tinyMCE.getInstanceById is not a function
       http://x.com/wp-includes/js/autosave.js?ver=20070306
       Line 99
       ```
   
 * And here I copied the lines that firefox pointed above as problematic:
 * post-new.php, line 1
    `<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//
   EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">`
 * **autosave.js line 99:**
    `var rich = ((typeof tinyMCE != "undefined") && tinyMCE.
   getInstanceById('content')) ? true : false;`
 * **tiny_mce_gzip.php, line 43**
    `tinyMCE = realTinyMCE;`
 * **tiny_mce_gzip.php, line 183**
    `tElm = targetDoc.frames[this.editorId];this.
   targetElement = tElm;this.iframeElement = targetDoc.getElementById(this.editorId);
   if (tinyMCE.isOpera) {this.contentDocument = this.iframeElement.contentDocument;
   this.contentWindow = this.iframeElement.contentWindow;dynamicIFrame = true;} 
   else {this.contentDocument = tElm.window.document;this.contentWindow = tElm.window;}
   this.getDoc().designMode = "on";}doc = this.contentDocument;if (dynamicIFrame){
   html = tinyMCE.getParam('doctype') + '<html><head xmlns="http://www.w3.org/1999/
   xhtml"><base href="' + tinyMCE.settings.base_href + '" /><title>blank_page</title
   ><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body
   class="mceContentBody">`
 * –/–
 * So, I opened my other wordpress – the one with the working visual tab, and checked
   for errors as well… the visual tab works perfectly, but it is good for comparison…
 * I switched from the visual to the code, and just one error was shown in the console:
 * **autosave.js, line 99**
 *     ```
       tinyMCE.getInstanceById is not a function
       autosave()autosave.js (line 99)
       onTimerEvent()prototype.js (line 191)
       bind()prototype.js (line 105)
       [Break on this error] var rich = ((typeof tinyMCE != "undefined") && tinyMCE.getInstanceById('content...
       ```
   
 * If the WP devs want to acess my broken blog, I can give acess/create an account,
   just ask here ^^
 *  [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * (@azaozz)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670420)
 * It looks like all errors start from this:
 *     ```
       unterminated string literal
       /www.w3.org/1999/xhtml"><base href="' + tinyMCE.settings.base_href + '" /><title...
       ```
   
 * Maybe a plugin issue… Did you try disabling all plugins and then clearing the
   browser cache?
 * If no change, can you copy the content of tiny_mce_config.php from whitin Firebug(
   while you’re on the write/edit page) and paste it here. Maybe there will be more
   clues in there.
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670423)
 * I have no plugins installed, but I Disabled All Plugins and cleared the cash 
   again. As strange as it is, one of the errors is gone. =P
 * Only showing two errors, the first one happens just by loading the page: It shows
   two times on the console:
 * **realTinyMCE is not defined
    onLoad()tiny_mce_gzip.php (line 43) [Break on this
   error] tinyMCE = realTinyMCE;
 * And this one below, who only shows up when I click on the Code Tab. The Visual
   tab generates no error when I click on it, but it remains dead like the image
   I posted on the first post.
 * **
    switchEditors is not defined onclick(click clientX=0, clientY=0)
 * **Here goes the code you asked:**
 *     ```
       2initArray = {
       3 mode : "specific_textareas",
       4 editor_selector : "mceEditor",
       5 width : "100%",
       6 theme : "advanced",
       7 theme_advanced_buttons1 : "bold,italic,strikethrough,separator,bullist,numlist,outdent,indent,separator,justifyleft,justifycenter,justifyright,separator,link,unlink,image,wp_more,separator,spellchecker,separator,wp_help,wp_adv,wp_adv_start,formatselect,underline,justifyfull,forecolor,separator,pastetext,pasteword,separator,removeformat,cleanup,separator,charmap,separator,undo,redo,wp_adv_end",
       8 theme_advanced_buttons2 : "",
       9 theme_advanced_buttons3 : "",
       10 language : "en",
       11 theme_advanced_toolbar_location : "top",
       12 theme_advanced_toolbar_align : "left",
       13 theme_advanced_path_location : "bottom",
       14 theme_advanced_resizing : true,
       15 browsers : "msie,gecko,opera,safari",
       16 dialog_type : "modal",
       17 theme_advanced_resize_horizontal : false,
       18 convert_urls : false,
       19 relative_urls : false,
       20 remove_script_host : false,
       21 force_p_newlines : true,
       22 force_br_newlines : false,
       23 convert_newlines_to_brs : false,
       24 remove_linebreaks : false,
       25 fix_list_elements : true,
       26 gecko_spellcheck : true,
       27 entities : "38,amp,60,lt,62,gt",
       28 button_tile_map : true,
       29 content_css : "http://myblog.com/wp-includes/js/tinymce/plugins/wordpress/wordpress.css",
       30 valid_elements : "p/-div[*],-strong/-b[*],-em/-i[*],-font[*],-ul[*],-ol[*],-li[*],*[*]",
       31 save_callback : 'TinyMCE_wordpressPlugin.saveCallback',
       32 imp_version : "20070528",
       33 plugins : "inlinepopups,autosave,spellchecker,paste,wordpress"
       34};
       35
       36
       37tinyMCE.init(initArray);
       ```
   
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670424)
 * Ps: The line 99 error is back
 * Error: tinyMCE.getInstanceById is not a function
    Source File: [http://x.com/wp-includes/js/autosave.js?ver=20070306](http://x.com/wp-includes/js/autosave.js?ver=20070306)
   Line: 99
 *  [Andrew Ozz](https://wordpress.org/support/users/azaozz/)
 * (@azaozz)
 * [18 years, 5 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670430)
 * If realTinyMCE is not defined, all other js that use it will fail. On the other
   hand the content of tiny_mce_config.php is OK.
 * The only other explanation is that gzip is not working properly on this server.
   TinyMCE gets zipped before sending it to the browser. That makes it a lot smaller
   in size.
 * Try commenting out line 89 in wp-includes/js/tinymce/tiny_mce_gzip.php. It should
   look like this:
    `// $supportsGzip = true;` (don’t forget to clear the browser
   cache after that).
 * If that works, send a ticket to your web host and ask them to check the zip/gzip
   configuration.
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670435)
 * It didn’t solve, but thanks for taking a look ^^
 *  [irvingbennett](https://wordpress.org/support/users/irvingbennett/)
 * (@irvingbennett)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670460)
 * I have had the same problem. I use Linux and XP. The problem persists across 
   all browsers and OS combinations. Java is enabled, NoScript is not installed,
   and there are no tell tale errors, just no visual editor.
 * I am running SVN code updated regularly.
 *  Thread Starter [godofcomics](https://wordpress.org/support/users/godofcomics/)
 * (@godofcomics)
 * [18 years, 4 months ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/#post-670464)
 * it must be our servers irvingbennett. The same files are working fine on my other
   server… Strange.

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/page/2/?output_format=md)

The topic ‘Broken Visual Button, stuck at Code Button’ is closed to new replies.

## Tags

 * [button](https://wordpress.org/support/topic-tag/button/)
 * [errors](https://wordpress.org/support/topic-tag/errors/)
 * [firebug](https://wordpress.org/support/topic-tag/firebug/)
 * [gone](https://wordpress.org/support/topic-tag/gone/)
 * [switch](https://wordpress.org/support/topic-tag/switch/)
 * [tab](https://wordpress.org/support/topic-tag/tab/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 22 replies
 * 9 participants
 * Last reply from: [wahmprintshop](https://wordpress.org/support/users/wahmprintshop/)
 * Last activity: [18 years ago](https://wordpress.org/support/topic/broken-visual-button-stuck-at-code-button/page/2/#post-670494)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
