Browser Tries to Download source_editor.htm When Clicking on the HTML Button in TinyMCE

While working on a Swiss website today, we noticed that every time we clicked on the HTML button in TinymCE, the browser tried to download source_editor.htm (which is a TinyMCE file). At first, we thought that there was a problem with the browser, so we tried another one but we had the exact same problem. Odd…

We then thought since that website was hacked (that’s why we were working on it), it might be that there is this tiny little malicious JavaScript hidden somewhere that is causing this issue, so we cleaned up the website completely, and we checked again, still, the same problem.

Then we thought, what if it was a problem with the hosting environment? What if Apache doesn’t recognize htm files as HTML files? So, we created a small htm file (we called it test.htm), and we uploaded it to the root directory of the website. We then pointed our browser to that file by going to http://ourclientjoomlawebsite.com/test.hm, and true enough, the file was downloaded instead of begin displayed.

So, what did we do to fix the problem?

Fixing the problem was easy, we only needed to add the following line to the beginning of the .htacces file which is located under the root directory of the website:

AddType text/html .html .htm

The above line essentially instructs Apache to treat htm files as html files.

But, why did the problem happen in the first place?

The server our client was on was a very old Plesk server with extremely basic settings – so basic that Apache wasn’t even set to recognize htm files by default. We were amazed that our client was the first one on that server who encountered the issue – but then again, that company didn’t have many clients.

In our opinion, if you encounter this problem, then it’s a sign that the hosting company you’re dealing with cannot be labeled as professional and that it’s a good idea to start shopping around!

Are there other reasons for this problem can happen?

Yes – this can also happen because of erroneous (intentional or unintentional) modifications to TinyMCE‘s core. In this case, the best solution to this problem is to re-install TinyMCE from scratch. Re-installation of TinyMCE is extremely tricky, especially if you’re using an old version of Joomla and/or an old version of TinyMCE – in that case, we recommend you contact some professionals to do the work for you.

Another reason where this problem can happen is because of wrong entries in the .htaccess file. If you see that your .htaccess file contains some quirky entries, then backup the file (in case you want to revert back) and remove them immediately, and finally re-test the website to see if the problem is still there.

We hope that our post was helpful for those facing the same problem… But, if you have read this post but you haven’t found it useful (e.g. it didn’t fix your problem), then don’t be shy; just contact us and we’ll fix the problem for you in no time and for a very affordable fee! Go ahead, give us a call or shoot us an email – we are there for you 24/7/365!

No comments yet.

Leave a comment