Major problems with the visual editor and no solutions yet

So I’ve been having a problem for several days now and I reached out a few days ago here and got a couple of replies, but the people who were trying weren’t able to figure it out. (Though they were VERY helpful and I’m grateful for their time and for attempting to help.)

Here’s the issue:

I’m the webmaster for the site at Valleyartsnj.com. The problem is four-fold:

Read More
  1. The “Visual” tab in the editor is selected, but there appears to be nothing inside the text box, certainly nothing “visual.” Instead, it’s all HTML in a white font color on a white background, so it appears blank. (I can see the “hidden” html text in the body of the editor when I highlight it all so I know it’s there.)

  2. I can’t click back and forth between the “visual” and “html” tabs.

  3. None of the editor’s normal formatting buttons show up. (The bold, italics, etc. row is gone.)

  4. I can’t seem to open any of the other pull-down menus on the editing pages, meaning I can click the triangle at the top of the “publish” “screen options,” or “help” boxes, for example, but it doesn’t do anything. (I CAN, however, use those pull-down menus on any other page, like the Appearance page or the Media Library page. They only don’t respond in the edit post and edit page pages.)

From what I’ve read, it sounds like the problem may be related to TINY MCE, since the dashboard and everything else seems to work and the problems appear to be limited to the editor.

What I’ve tried so far:

I’ve tried disabling all the plugins, including renaming the plugin directory and ultimately uninstalling ALL plugins and making sure the plugin directory is completely empty. Hasn’t worked.

I’ve tried changing themes over to the Twenty Fourteen theme and that doesn’t help. I still have those problems on the default theme.

I’ve tried reinstalling WordPress 3.9.2 twice automatically (via my host’s script) and three times manually but that hasn’t helped. (I deleted everything but the wp-config file and the wp-content directory.)

I’ve tried it on various browsers (IE9, the latest version of Chrome, Safari, and the latest version of Firefox) and on several different computers and the results are the same on each.

I’ve tried editing the php.ini file to disable “Magic Quotes” as someone said that worked for them. It didn’t work for me so after testing it, I restored the original, clean php.ini file.

I’ve cleared all caches several times but no dice.

I also recently found this coming up as an error in the debug section of Chrome’s inspect element option. The errors come up when I try to click on the “Visual” and “HTML” tabs in the editor:

Uncaught ReferenceError: switchEditors is not defined post.php?post=477&action=edit:275

Uncaught ReferenceError: switchEditors is not defined post.php?post=477&action=edit:276

So again it may be a TINYMCE thing or it may have something to do with whatever is supposed to allow me to switch between those tabs and interact with all of the various other tabs/pull-downs on the editing pages.

I can’t figure out what else to try, so I’d love some input, ideas, advice, etc.

Related posts

Leave a Reply

2 comments

  1. Include this bit of jQuery into your editor pages. It will disable the Visual tab, detect if the Visual tab is active, notify the user that the tab is active and that it should not be used, and will switch to the Text tab and refresh the page to load un-formatted data.

    <script>
    ( function( $ ) {
        $( document ).on( 'ready', function() {
            // Detect Page Editor...
            var PageType = $( 'body.post-type-page' );
            if( PageType.length ) {
                // Disable TinyMCE Tag...
                PageType
                .find( 'button#content-tmce' )
                .css( { 'pointer-events' : 'none' } )
                .html( 'Visual (Disabled)' );
                // Detect Active TinyMCE...
                var ActiveTMCE = PageType.find( '.tmce-active' );
                if( ActiveTMCE.length ) {
                    // Toggle the TinyMCE off...
                    ActiveTMCE
                    .find( 'button#content-html' )
                    .trigger( 'click' );
                    alert( 'The Visual Editor is disabled on Pages due to its interference with HTML and shortcode structure. The editor will now switch to TEXT mode and refresh the page to preserve your data.' );
                    location.reload();
                }
            }
        } );
    } )( jQuery );
    </script>