WordPress.org

Ready to get started?Download WordPress

Forums

Broken Visual Button, stuck at Code Button (23 posts)

  1. godofcomics
    Member
    Posted 6 years ago #

    This is what happened to me, on all my 3 wordpresses:

    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!

  2. godofcomics
    Member
    Posted 6 years ago #

    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

  3. godofcomics
    Member
    Posted 6 years ago #

    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

    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 ^^

  4. godofcomics
    Member
    Posted 6 years ago #

    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

    Line: 184
    Char: 713
    Error: Unterminated string constant
    Code: 0
    URL: http://myblog.com/wp-admin/post-new.php?posted=49

  5. godofcomics
    Member
    Posted 6 years ago #

    Line: 44
    Char: 2
    Error: 'realTinyMCE' is undefined
    Code: 0
    URL: http://myblog.com/wp-admin/post-new.php?posted=49

  6. godofcomics
    Member
    Posted 6 years ago #

    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.

  7. Andrew Ozz
    WordPress Dev
    Posted 6 years ago #

    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.

  8. godofcomics
    Member
    Posted 6 years ago #

    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 ^^

  9. godofcomics
    Member
    Posted 6 years ago #

    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 ^^

  10. Andrew Ozz
    WordPress Dev
    Posted 6 years ago #

    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.

  11. godofcomics
    Member
    Posted 6 years ago #

    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);
  12. godofcomics
    Member
    Posted 6 years ago #

    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
    Line: 99

  13. Andrew Ozz
    WordPress Dev
    Posted 6 years ago #

    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.

  14. godofcomics
    Member
    Posted 6 years ago #

    It didn't solve, but thanks for taking a look ^^

  15. irvingbennett
    Member
    Posted 6 years ago #

    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.

  16. godofcomics
    Member
    Posted 6 years ago #

    it must be our servers irvingbennett. The same files are working fine on my other server... Strange.

  17. godofcomics
    Member
    Posted 6 years ago #

    Problem solved. I think this is the same thing happening to all others having this trouble. The solution:

    Server:

    "Our servers automatically GZIP all output, so if an application such as WordPress tries to GZIP it as well, problems are caused like this one.
    If you disable GZipping in your application's configuration it should start behaving correctly."

    Anyone knows how to turn off gzip compression inside WordPress?

  18. pozek
    Member
    Posted 6 years ago #

    You can try remove or comment this lines from the file tiny_mce_gzip.php, for me it works fine. I use WordPress 2.3.2

    // Check if it supports gzip
    if (isset($_SERVER[’HTTP_ACCEPT_ENCODING’]))
    $encodings = explode(’,', strtolower(preg_replace(”/\s+/”, “”, $_SERVER[’HTTP_ACCEPT_ENCODING’])));

    if ((in_array('gzip', $encodings) || in_array('x-gzip', $encodings) || isset($_SERVER['---------------'])) && function_exists('ob_gzhandler') && !ini_get('zlib.output_compression') && ini_get('output_handler') != 'ob_gzhandler') {
    $enc = in_array(’x-gzip’, $encodings) ? “x-gzip” : “gzip”;
    $supportsGzip = true;

    }

    // Use cached file disk cache
    if ($diskCache && $supportsGzip && file_exists($cacheFile)) {
    if ($compress)
    header(”Content-Encoding: ” . $enc);

    echo getFileContents($cacheFile);
    die();

    }

  19. Krofinzki
    Member
    Posted 6 years ago #

    I had this error message in firebug

    realTinyMCE is not defined
    http://mywebsite.com/blog/wp-includes/js/tinymce/tiny_mce_gzip.php?ver=20070528
    Line 44

    and commenting the lines as advised by pozek solved it. Maybe there should be some option in the settings to disable gzipping of stuff in the future?

    Note: Disabling "WordPress should compress articles (gzip) if browsers ask for them" did not solve this problem.

  20. neeonline
    Member
    Posted 6 years ago #

    Hey All!

    Commenting out line 89 in wp-includes/js/tinymce/tiny_mce_gzip.php:
    // $supportsGzip = true;

    The problem will be solved (not resolved).

    If that works, your web host zip/gzip configuration is incorrectly. Contact your admin / owner host and call to check these configurations.

    When the host zip/gzip configuration Finnish, remove comment at line 89 in the file.

    I hope to help you.

    Neeo, for Brazil.

  21. ilnickiap
    Member
    Posted 6 years ago #

    this FINALLY was the answer I needed -- the removing spaces in my Plugins worked for a couple days, just long enough to screw my brain up.... THANK YOU SOOOOO MUCH for bringing an end to my week of searching for the answer.

    COMMENT LINE... 89!!!!!!

    (it rhymes too)

    ;)

    -ai

  22. hambergk
    Member
    Posted 6 years ago #

    Had the same problem, however I was able to fix it by changing back to the original theme. Something in my theme seemed to have corrupted the text editor.

  23. wahmprintshop
    Member
    Posted 6 years ago #

    well, I have this problem as well now. I am running WordPress 2.5.1 and I do not have the file tiny_mce_gzip,php

    Commenting out line 89 in wp-includes/js/tinymce/tiny_mce_gzip.php:
    // $supportsGzip = true;

    So how do I solve the problem for mine?
    line 83 'tinyMCE' is undefined on myblog.com/wp_admin/new-post.php

    Would love any help if you have it.

Topic Closed

This topic has been closed to new replies.

About this Topic