0

My server has problems displaying the Visual and Text buttons, the code for the buttons is simply missing and none of the obvious solutions works.

// blank default Install, no plugins, default theme // problem on entire server // not a wp-config.php issue /concenate scripts etc

For some strange reason my server will not process $buttons and therefore the buttons are not visible. Any ideas what could be the issue?

Is this a PHP configuration issue?

I dont get any JS errors at all, so pretty much have no idea how to fix it, because there's simply code missing in the source.

if ( self::$this_quicktags && self::$this_tinymce ) {
    $switch_class = 'html-active';

    // 'html' and 'switch-html' are used for the "Text" editor tab.
    if ( 'html' == wp_default_editor() ) {
        add_filter('the_editor_content', 'wp_htmledit_pre');
    } else {
        add_filter('the_editor_content', 'wp_richedit_pre');
        $switch_class = 'tmce-active';
    }

    $buttons .= '<a id="' . $editor_id . '-html" class="wp-switch-editor switch-html" onclick="switchEditors.switchto(this);">' . _x( 'Text', 'Name for the Text editor tab (formerly HTML)' ) . "</a>\n";
    $buttons .= '<a id="' . $editor_id . '-tmce" class="wp-switch-editor switch-tmce" onclick="switchEditors.switchto(this);">' . __('Visual') . "</a>\n";
}
  • 1
    you try reinstalling wordpress? sounds kind of like permissions issues or incomplete install. Missing code? from where? what obvious solutions have you examined? what kind of server are you running on? – GhostToast Dec 11 '13 at 19:43
  • Its a fresh install - I added the code manually and receive a JS error now ==> Uncaught ReferenceError: switchEditors is not defined ==> latest jquery is loaded and still getting this – mashup Dec 11 '13 at 19:59
0

The problem in the end was APC

My php.ini file dropped the apc configuration and it would break the JS, everything else worked

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.