that's me. Hi there,
you stumbled upon
Enrico Icardi
a web enthusiast with clear interest in
back-end AND front-end development.

TinyMCE + WordPress + genesis + venture = nervous breakdown

I’ve just worked 5 hours on one of the most boring task of my life to solve one of my client’s issue…and solved it with in a really “weird” way….so weird i wanted to share it to hopefully save some life or some serious nervous breakdown :)

So:
for all of you who will start to read “o is not a constructor” or “q is not a constructor” in your tiny little useful console while being in the “wp-admin” section trying to modify post, page, etc (any page showing the tinyMCE editor)….

I’ve no idea why…and i’ve no idea how…but with my combo (wp+genesis+venture theme) somehow the tinyMCE (i guess) was initialized twice
Took me hours to figure this out because of the huge combo of systems on top of the clean WP installation…anyway…here’s the solution:

Adding the following script in the “functions.php” file should make things right and let you correctly initialize tinyMCE once (to finally see labels in the right way, localization going fine, etc.):

/**
  *
  * START remove double initialization of tiny_mce
  *
 **/

function remove_tinymce(){
	if (has_action('admin_print_footer_scripts','wp_tiny_mce')){
		remove_action('admin_print_footer_scripts','wp_tiny_mce', 25);
	}
}

add_action('init', 'ckeditor_init');
function ckeditor_init(){
/*	global $ckeditor_wordpress;
	require_once 'ckeditor_class.php';*/

	if(is_admin()){
			add_action('admin_print_footer_scripts', 'remove_tinymce');
	}
}

/**
  *
  * END remove double initialization of tiny_mce
  *
 **/

Don’t ask me why, just say “thanks” if that’s what you’re looking for :)

3 comments
  1. Roman says: November 28, 20112:47 pm

    Thanks a lot! This is the most weird solution and it is works!

  2. Dirk says: November 29, 201112:45 pm

    Thanx a lot, too! Had the same Problem after enabling the plugin “more fields”, your solution fixed it.

  3. enrico says: January 2, 201210:40 am

    :D glad i could help!

Submit comment