tinyMCEPreInit broken – maybe CDN related
-
Tried searching for solutions to this, but no avail.
Basically, In a production environment, the TinyMCE editor doesn’t load. No ‘visual’ or ‘text’ tabs at the top, and no JavaScript errors thrown. Cloning the server, and testing when removed from the CDN (CloudFront) and loadbalancer works fine.
Here’s what I’ve noticed so far in trying to debug:
On the test server if I watch the tinyMCEPreInit object and inspect it’s contents, the base parameter is set correctly as : “http://<domain>/wp-includes/js/tinymce”
Doing the same in production, the base parameter is empty.
I then tried forcing the URL through the includes_url filter since the base parameter is set by $baseurl = includes_url(‘js/tinymce’); in /wp-includes/class-wp-editor.php with:
$callback = function($url, $path) { $url = get_bloginfo('url').'/'. WPINC . '/'; if ( !empty($path) && is_string($path) && strpos($path, '..') === false ) $url .= ltrim($path, '/'); return $url; }; add_filter('includes_url', $callback, 10, 2);In the test environment, I can force the base URL to whatever I wish. In prod this still remains empty. I’m at a loss. Even tried upgrading to 3.7, with no luck. Thoughts?
The topic ‘tinyMCEPreInit broken – maybe CDN related’ is closed to new replies.