Due to security concerns, we generally try and keep the WordPress websites we host as up-to-date as possible , both in terms of the WordPress core, plugins and themes.
Unfortunately this morning I got a message from a customer informing me that since the WordPress 4.2 core update, the post/page editor had stopped working. A bit of investigation confirmed that upon load, the editor was causing a JavaScript console error of:
tinymce is not defined
When I checked the loading history of the page using Chrome’s excellent Developer Tools, I found that the PHP loader for tinymce, called wp-tinymce.php, was giving a 403 error, generally indicative of a permissions issue. I went in to the hosting platform (Plesk) and reset the file permissions but unfortunately, no luck.
Solution
I then remembered that for increased security, we had previously used Plesk’s WordPress Security Scan tool which does additional hardening of WordPress.
One of these options affects the wp-includes folder (where TinyMCE resides).
I rolled back this setting and refreshed the post edit page and – sure enough – everything came back to life.
Obviously there is nothing to be done about this as Plesk cannot work around all WordPress functions but its certainly one to look out for.
Note for other platforms
For people hosting WordPress on non Plesk platforms having this issue, I’d strongly recommend easing the permissions on the wp-tinymce.php file first and if still no luck, then on the tinymce folder as a whole.
Urgent/Short Term Work Around
As short term workaround, its worth noting that your content is there, its just not visible – if you click in the editor window and do select all, you should see the content – you can copy this to a different editor to make changes and copy back as a band-aid fix.
Other Possible Solutions
Some other solutions I have heard working for people with this problem:
Disable JavaScript Concatenation
Add the following to your wp-config.php:
define( 'CONCATENATE_SCRIPTS', false );
I dont get what you did…
I delete TinyMCE Advanced, but it didnt work.
What should i do ? I cant put any descriptions in my post !
Thnxs
Hi Sap,
There should be no need to delete anything. If your using Plesk hosting, change the security option for the includes folder as per my post. If you are not on Plesk based hosting, trying easing the permissions on the wp-tinymce.php file or perhaps the whole tinymce folder.
I have try changing permissions on the whole tinymce folder (/home/quieroinfo2/quieroinfo.com/wp-includes/js/tinymce) to 755 and nothing
I have added “define( ‘CONCATENATE_SCRIPTS’, false );” in my wp-config, and nothing…
I dont know what else should i do 🙁
Thanks for posting this solution. I had the same problem, and could resolve it quickly with your help!
Hey Tom,
Glad it helped!
Hi Bob,
The good news is that once you’ve opened a fresh WP instance and got TinyMCE files to load once, you can apply the “Security of wp-includes folder” security improvement again without any issues.
The not-so-good news is that we have fixed this bug in one of Plesk 12 MUs, but it seems that it keeps coming back. Can you tell me which Plesk 12 version (including MU version) you are using?
Hi Andrey,
Thanks for the post! I will try re-enabling the includes folder security later on. My Plesk version is Windows 12.0.18 Update 44 although this update – brought MySQL/PHP down (it happens about 50% of the time when Plesk updates) so I don’t know if it applied correctly or not.
Sorry to hear about your update issues, Bob. Can you e-mail me the details so we could take a look at them?
Update: we have fixed this issue in Plesk 12.0.18 MU #46. Details are in release notes here: http://kb.odin.com/125492
We’ve also made sure that the fix is more foolproof than the last time, so the problem should not be recurring in the future (at least we hope so!)
Hey Andrey, that’s awesome thanks for the update. As I mentioned in my post, Parallels/Odin cannot be expected to work around every update to WordPress so I assumed I would simply have to leave that feature disabled. Thanks for the continued work on the WordPress tools. We use them every single day now.
I am not so sure you fixed this in Plesk – as it just happened to me and i use plesk 12.0.18 Update #48, last updated at May 31, 2015
I was so happy… i had plesk up to date,, ,then i updated my wordpress and boom – all the text in the edit pages dissapeared…
BUT luckily this thread fixed that quick for me! Thanks so much to all for sharing…
I just went into plesk / domains/ applications / manage my applications / wordpress / check security (just like your fantastic screen shot!) and rolled back the include folder security… all was great then went and re-enabled it and still works great… interesting.
Hi Keith,
Thanks for the comment and I’m glad my post helped!
Bob, thank you very much for this post, changing permissions to 755 for the js/ and tinymce/ did the job and I have my visual editor back!
Good to remember about Chrome’s Developer Tools. For the future I hope I’ll be smart enough to check the errors before browsing the Internet for the solution. 🙂
Hey Ovidiu,
Thanks for the comment and glad it helped!
Hi @Bob McKay
After Disable JavaScript Concatenation, I get a net error in the tags, which make the tag is bad, like: if i will add (wp) as tag i will get: wundefinedp
Hey Mohammed,
All I can suggest here is check that the edit you made is terminated correctly and isn’t causing errors further down the page.
Anyway, thank you man for everything.
Unfortunately, this doesn’t fix my problem. In the visual editor, there is nothing. The cursor is in the upper-left of the edit window, and attempting to highlight the text doesn’t work, because it isn’t white text – it’s no text at all. It does show the word count at the bottom, so it “knows” there’s supposed to be text. The text editor does show the text, so this is a different variation of the blank editor problem.
I disabled all plugins, and then, to make sure there was no conflict, renamed the plugins folder so they couldn’t be accidentally accessed. I changed to a default WordPress theme, added “define(‘CONCATENATE_SCRIPTS'”, false);, made sure all file permissions were correct, deleted the wordpress admin folder and includes folder and uploaded fresh copies (including tinymce). My .htaccess file doesn’t show anything other than the standard WordPress mod_rewrite code. I read somewhere else that “Use Google Libraries” plugin would help. It didn’t.
With a completely vanilla website, debugging doesn’t give any alerts or warnings. But still, no visual editor. I tried disabling and re-enabling the visual editor. That didn’t change anything.
Hopefully there will be an answer somewhere. I keep telling myself I’m not the only one!
Hi Bob,
If you’re using Chrome, have you checked the Web Developer Toolbar to see what errors you might be getting from the console and from the script loaders?
thanks… worked a charm.
this one was bugging me for a couple of weeks.
Hey Sohail,
Thanks for the comment and glad I could help!
hi bob..
i have same problem, but i did’nt fix this error.
i used wordpress version 4.2.2?
Can you tell me something about this error with another trick?
Hi Deb,
All you can do is check all security settings pertaining to the wp-tinymce.php file – if that doesn’t do it, it sounds like you have a different problem.
My problem started after the upgrade to 4.2.3. I did all of that suggested above and I still didn’t have an editor to use. I checked my error log in cPanel and it said that post.php was set to 664 so I changed it to 644 and the editor finally appeared! Now I can do my job! Thanks!
Hey George,
Thanks for the post! Just to be clear, did you mean to say it was set to 644 and you change it to 664? As it seems weird that reducing the write permissions (making them more restrictive) would solve the problem.
$ define( ‘CONCATENATE_SCRIPTS’, false );
That did the trick for me on 4.2.3. Thanks for sharing!
Hey Per André,
Thanks for the comment!
This doesn’t clear my problems. I try everything , wordpress doesn’t like chrome. It works only on mozzila. Very buggy platform . I hope someone comes up with other solution.
Hi Benny,
If your problem only occurs in one browser then its definitely a JavaScript problem, not a server-side problem. WordPress itself is pretty stable but the sheer number of plugins and themes, all updated at different times, detract from that stability. Have you definitely correctly tried the “define( ‘CONCATENATE_SCRIPTS’, false );” fix as this sounds like the problem for you?
Every time there was a WP update, I had this problem and quickly solved it by unchecking the security of the includes folder option in the WP Toolkit, but it did not work this time. I then found this site and added define( ‘CONCATENATE_SCRIPTS’, false ); to my wp-config.php and now I have tinymce working again. Is it time to give up on the WP Toolkit?
Thanks for posting a solution
Hey Esbon, Thanks for posting – I’ve never used the WP Toolkit before so can’t say I’m afraid!
I really love you Mr. McKay. You made my day, seriously!
LOL – thanks for the comment and glad it helped! 🙂
The edit to wp-config worked for me. This answer really helped me. Thanks a lot!
Thanks Bob,
Disabling JavaScript concatenation in the wp-config.php file worked a treat for me:
define( ‘CONCATENATE_SCRIPTS’, false );
I’m using WP version 4.4.2, am not using Plesk and have also installed the plugin “TinyMCE Advanced”.
best solutions, you r the best