Cubosystems
Forum Replies Created
-
Forum: Fixing WordPress
In reply to: Visual Editor in 3.1 disappearedWell I am surprise and it sounds really wiered as these are standard software package and if works for someone then why not for others. Logically it means (may well be) some other factors (like server environment and platform) contributing to the issue. May be you guys should give full access rights (777) to the entire installation directory and see if it works. It’s just a thought.
Forum: Fixing WordPress
In reply to: Missing Visual EditorI hope you are problem is solved. Just as mentioned by kbarncat, my code is identical but I wrote a little bit of code to by pass so many steps to return the required value to get Visual Editor enabled. Of course my problem was that my editor was fully disappeared.
About your issue unfortunately I don’t see it in my WP 3.1. It is working perfectly including visual editor after my fix. I wish I could help you all guys. I myself is a programmer and for me to fix I need to know the exact behavior and I should be able to recreate it in my installation to debug. Sorry all I couldn’t help you all much.
Forum: Fixing WordPress
In reply to: Missing Visual EditorI had the same problem while upgrading a company blog site. I had to get my hands dirty by going into code level of WordPress and started debugging. I did a quick fix to get it working ultimately. Pls take a copy of your file before you do so if it doesn’t work you can always replace it back. Please note that I did this after me upgrading it to 3.1 but you may try it out with others if you have same problem.
– Under ‘wp-includes’ directory open ‘general_templates.php’. Look for ‘function user_can_richedit()’ and replace the whole function with following code. I think the line numbers will be somewhere from 1734 to 1750.
` function user_can_richedit() {
global $wp_rich_edit, $pagenow, $is_iphone;if ( !isset( $wp_rich_edit) ) {
if ( get_user_option( ‘rich_editing’ ) == ‘true’ &&
!$is_iphone && // this includes all Safari mobile browsers
( ( preg_match( ‘!AppleWebKit/(\d+)!’, $_SERVER[‘HTTP_USER_AGENT’], $match ) && intval($match[1]) >= 420 ) ||
!preg_match( ‘!opera[ /][2-8]|konqueror|safari!i’, $_SERVER[‘HTTP_USER_AGENT’] ) )
&& ‘comment.php’ != $pagenow ) {
$wp_rich_edit = true;
} else {
$wp_rich_edit = false;
}
}// My code as a fix
if ( get_user_option( ‘rich_editing’ ) == ‘true’ )
$wp_rich_edit = true;return $wp_rich_edit;
// return apply_filters(‘user_can_richedit’, $wp_rich_edit);}
After replacing the code make sure you Edit user profile and untick “Disable the visual editor when writing” option. I.e Select Users -> Edit User and then you will see top most field with checkbox. This functionality of enabling/disabling visual editor for the user will work afterwards.
Please make sure you would test it properly as I don’t know whether it would have any other effect to other parts of the WP or any other functionality. As per my requirement this worked well and I didn’t really dig behind actual root cause due to lack of time.
Forum: Fixing WordPress
In reply to: Visual Editor in 3.1 disappearedSorry I also one thing I missed to mention is that having done above you can use the WP user profile functionality where you could enable/disable Visual editing for indivisual user. It is under Users – Edit user profile and then untick “Disable the visual editor when writing”
Forum: Fixing WordPress
In reply to: Visual Editor in 3.1 disappearedI had the same problem while upgrading a company blog site. I had to get my hands dirty by going into code level of WordPress and started debugging. I did a quick fix to get it working ultimately. Pls take a copy of your file before you do so if it doesn’t work you can always replace it back. Please note that I did this after me upgrading it to 3.1 but you may try it out with others if you have same problem.
– Under ‘wp-includes’ directory open ‘general_templates.php’. Look for ‘function user_can_richedit()’ and replace the whole function with following code. I think the line numbers will be somewhere from 1734 to 1750.
<strong> function user_can_richedit() { global $wp_rich_edit, $pagenow, $is_iphone; if ( !isset( $wp_rich_edit) ) { if ( get_user_option( 'rich_editing' ) == 'true' && !$is_iphone && // this includes all Safari mobile browsers ( ( preg_match( '!AppleWebKit/(\d+)!', $_SERVER['HTTP_USER_AGENT'], $match ) && intval($match[1]) >= 420 ) || !preg_match( '!opera[ /][2-8]|konqueror|safari!i', $_SERVER['HTTP_USER_AGENT'] ) ) && 'comment.php' != $pagenow ) { $wp_rich_edit = true; } else { $wp_rich_edit = false; } } // My code as a fix if ( get_user_option( 'rich_editing' ) == 'true' ) $wp_rich_edit = true; return $wp_rich_edit; // return apply_filters('user_can_richedit', $wp_rich_edit); }
Please make sure you would test it properly as I don’t know whether it would have any other effect to other parts of the WP or any other functionality. As per my requirement this worked well and I didn’t really dig behind actual root cause due to lack of time.