Support » Fixing WordPress » Problem with visual and html editor

  • Resolved Nessdufrat


    My problem is as follows : I can’t access the visual editor at all anymore. I don’t care because I didn’t use it, but I have several other users on my blog and they don’t really know html, so they really need to be able to use it.
    First of all, I spend the last 3 hours searching the forum, google, trying various hacks and solutions, and nothing worked.
    I desactivated all the plugins, didn’t change anything. I switched to the default theme, same. I used the .htaccess hack (I had a former problem with the flash uploader two months ago, I solved it with the no flash uploader as nothing else worked. Of course, the first thing I did was desactivate the plugin, even though I used the blog several times since the installation and everything worked perfectly. But I tried the .htaccess hack anyway, just in case), I cleared the browser’s cache multiple times, I also cleared the js cache containing the tinymce data, I tried three different browsers on two different computers (firefox, ie and safari, first two on PC with win xp, firefox and safari on mac with Leopard. I could try firefox on linux, but I don’t really see the point…), I tried login in with an other account (I have admin and basic accounts), I tried unchecking the “use the visual editor”, then checking it again, I looked in the sql database (richeditor was set as “true”), I tried the compress = false hack in the tinymce file that I found on this forum…
    Nothing works.
    There are two things I haven’t tried and I will not try : doing a fresh install, and upgrading the WP version. I know some of the plugins I’m using right now and I really need would not work with a newer version, and I had to modify some files to make them work with the plugins, I don’t want to spend the next week trying to find which ones were modified and which were not.
    Anyway, this WP blog has been working flawlessly for the past two years, appart from the flash uploader that suddenly refused to work two months ago, and I didn’t touch a single thing, so I don’t understand what could have gone wrong.
    I noticed, using the debug console, that quite a lot of functions were “undefined”, and variables were undefined as well, some of them associated to switcheditors, editor.js, tinymce. But I really don’t know what to do with these files…

    Any clues on the next steps to take, here ?

    Thanks a lot !

    (and merry christmas ! Yes, I know, it’s christmas, and I’ve been spending all morning trying to fix this issue… I really need it to work !)

Viewing 15 replies - 1 through 15 (of 21 total)
  • Describe exactly what happens when you try to access the rich editor.

    I’m suffering the same problem since upgrading to 2.9
    When I open a post to edit, the Visual tab displays HTML, and so does the HTML tab. There is no way to invoke the visual editor.

    If I add a new post, the visual editor works at first but if I switch to HTML and back it stops working and stays in HTML.

    I’ve re-installed wp-admin but that makes no difference. It seems to be related to database variables being corrupted or misinterpreted.

    I noticed, using the debug console, that quite a lot of functions were “undefined”, and variables were undefined as well, some of them associated to switcheditors, editor.js, tinymce. But I really don’t know what to do with these files…

    @nessdufrat: Even if you didn’t change anything on your site, you probably upgraded your browser.

    I only now saw that you are using WP 2.5. That’s a really old version, by WP standards. The only longterm solution is to upgrade and stay up to date.

    @ringmasterict: Try disabling all plugins. Also, what makes you think it’s caused by database corruption?

    Yeah, as I said, I won’t upgrade WP on this particular website. Maybe later, when I have a whole month to correct all things that will go wrong…
    So, what’s happening ? Nothing. It shows the “visual” tab, but it’s html code only, and when I click on html, nothing happens, it doesn’t even change tab, as if javascript was desactivated (it’s not the case) or if there was a problem with the prototype, jquery or scriptaculous library.
    Yes, I upgraded firefox on the pc and on the mac, but safari and IE were unchanged, so it’s not a browser, nor a computer related problem.

    To try to fix it temporarily, I installed tinymce advanced (the version compatible with wp 2.5, of course), but nothing happens. I configured the plugin, it’s, of course, activated, but the problem stays exactly the same, the editor is “stuck” in html style (which is, actually, quite logical if there is a problem in the file, especially if it’s affecting the Switcheditors variable).

    I may upgrade everything in a few months, but now, I’d like a solution for the time being 🙂

    Anybody ? 🙁 I’d like to fix this ASAP, anyone can tell me what could have caused the switcheditors variable to suddenly be “undeclared”, without any update, any additional plugin, any manipulation whatsoever ?

    So, I tried some new things today, like checking the chmod of the tiny_mce_config.php or disabling gzip, but nothing works. Also, I noticed that something was changed on most of my files on the 15th of december, and on the 15th of december, I didn’t do anything with wordpress. I didn’t even log in. However, it’s the date of the database backup, but I don’t think the wp database backup plugin would need to access admin wp files…
    What should I do ? (I don’t tell me to upgrade, I really can’t right now, I just need a temporary fix)
    I am under the impression that the switcheditors.js file doesn’t work, or doesn’t get called properly, and that’s why it’s stuck in html mode, although the tab is showing “visual”. That might explain why the tiny mce advanced plugin doesn’t work either, since the problem is switching from visual to html.
    I’m pretty sure there is no problem with tiny mce itself.

    Any advice ?

    Ok, so now I took the whole tinymce folder from a working website (it’s wordpress 2.6 or 2.7, I don’t remember, anyway, the visual editor is working on this one) and replaced my tinymce folder with it. It didn’t change anything.
    Also, I tried to use the firefox debug on the working website post-new.php page, and I get the same errors (undeclared variable, switcheditors…) as in the non-working page.
    I guess the problem is server related, I’m actually pretty sure of it. They probably changed something in the configuration of the server, on the 15th of december (it’s like, 200 files were noted as “modified” on the 15th of december, all of them at 00:45), and that’s why it’s not working anymore. (the other website is on another host)
    However, I tried all the “server-related” solutions, I can’t get a single one working. And my tiny_mce_gzip.php (or whatever its name is) is a whole bunch of letters and digits, it’s encoded and I don’t really now how to modify it. It seems awfully complicated to decompress it, but I’d like to add something about the gzip compression in the file, as stated in one of the solutions I found (the only one I couldn’t try).
    Also, something strange, in the wp 2.7 tinymce folder, I don’t have this tiny_mce_gzip.php. I thought the tiny_mce_config.php would create it, but it didn’t. So is it only in wp 2.5 and older versions ?

    Edit : I replaced my tinymce folder with the original tinymcefolder from wp 2.5. The tiny_mce_gzip.php is empty, and even after loading the post-new.php page (I thought it would create something in this file), it remains empty. What is the problem ?

    So, found a correct tiny_mce_gzip.php file, tried it, tried doing the modifications mentionned on this post ( on it, nothing works. I checked the chmod, I cleared the cache multiple times, I cleared the wp cache as well, I changed browser… nothing.
    I’m getting really desperate, here. Obviously, it’s not the gzip compression that causes the problem, it’s not browser related, it’s not plugin related, it’s not computer related, it’s not a corruption of a tinymce file…
    I could try reinstalling wp 2.5, but I don’t really see the point here, since I’m pretty sure it comes from the server. I could try uploading the whole site to another server and duplicating the database to see if the problem would still be here, but isn’t there an easier solution ? Is it normal that the tinymce advanced editor doesn’t show up, even if the plugin is activated ?

    Ok, so now the fun part…
    After much struggle duplicating the entire website and database, and putting it on another host (free host, I can’t use it for the real blog, it’s just for testing purpose), the visual editor works.
    Which means the problem is with the host.
    How can I be sure upgrading to 2.9 will solve this problem ?

    After setting up a test blog in 2.9 on the “problem” server?

    (and don’t forget to celebrate New Year)

    Actually, I just found out what it was. My server has been hacked through a security fail in phpmyvisit.
    Apparently, I’m not the only one in this case. All my php files (even the one which are not part of wordpress) have been modified, and a php function encoded in base64 was added on top of each file.
    Right now, I’m cleaning all the files. I’ll come back to let you know if it solved the tinymce problem.

    So, after cleaning all the php files, I reuploaded everything, and now, my visual editor is back.
    I don’t know which file was causing the problem, but it was likely a whole bunch of them.

    So, to add a little something : today, strangely, visual editor wasn’t working any longer. After some research (my server was alright this time), I discovered that TinyMce and WP-Superedit don’t get along very well (I got some php errors when loading the tinymce config file, pointing to a file in superedit), so I deactivated WP-superedit, and everything is fine.

    I have a related problem that is not resolved by this thread.
    The HTML and Visual tabs do not appear on my edit screens at all. They worked when I first installed WordPress 2.8.x a couple of weeks ago, then they disappeared. Today I upgraded to 2.9, but the problem remains.

    Are there shortcut keys, or menu options to do the same thing?

    I’m using Firefox 3.0.16 on a pc. Hosted by Hostgator. I’m new to WordPress, php, and mysequel, so verbose explanations would help.

    Happy 2010!

    First of all, you could try to empty the js cache, which is in wp-content, uploads, js. You’ll have a file with a really long name, full of digits and letters. Erase it.
    Also, try emptying the navigator’s cache. Try using another navigator, for testing purposes, like IE, and see if the problem remains.
    I can’t really help you, because I don’t know WP 2.9, since I’m still on the 2.5 version.
    Try deactivating all your plugins, then emptying the navigator’s cache, then check if you still have the problem. If not, try reactivating your plugins one by one, to see which one causes your problem. If it’s not plugin-related, not navigator related, not computer related, maybe the problem is on your host.
    Happy 2010 to you too ! I hope you can solve this problem, I was getting crazy on Monday when I couldn’t get my visual editor to work and none of the solutions would work…

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘Problem with visual and html editor’ is closed to new replies.