Movable Type 4: are your entry screen text boxes greyed out?

Published on 9 November 2007 in , , ,

Two versions of this post. I’ll start with the executive summary. If you’ve moved to Movable Type 4 and find that when you get to edit an entry, the body and Extended fields are all greyed out, then I might have a cure for you!

Have you, on your server, got any redirects which redirect any .html file to another extension? I do, and when I turn that off, all is solved. This is because Movable Type 4 has some .html files which, or so it appears, it calls from the edit screen. In my case, the MT4’s Movable Type .html files were being renamed .live, so it didn’t work.

Once I’d disabled this for Movable Type’s directory on my server, everything worked properly. I’ve posted this onto the Movable Type forums as well so hopefully it will help others.

The long, waffely version

I’ve recently been doing some changes to my Movable Type setup, including moving it for the first time to sit on planetbods.org – previously it was elsewhere, but will go into that in a later post.

At the same time, I was also moving from MySQL 4 to SQLite due to server differences, so needed to get the data across. Movable Type 4 has a handy “Backup” function which basically dumps all the required data you need to create a full backup (as opposed to its earlier “Export” function which didn’t) so I duly dumped the data out of the old server, and restored it on the new. All fine bar it encoding some < and &rt;’s as &lt; and &gt; that it shouldn’t have done, which caused some minor confusion when it came to a test publish and I ended up with files with silly names like &lt;$MTArchiveCategory dirify=&quot;1&quot;$&gt;.xml.

Anyway, that aside, all seemed well until I tried to actually edit anything. Every time I went to the edit screen, the page was editable, but the text box where you enter content was completely locked off. Exactly the same problem was had when editing templates.

At this point it gets a little hazy as to what actually happened, but the following two things happened roughly the same time:

  1. I created a new user account with full admin rights
  2. I moved Movable Type to sit on www.bods.me.uk instead, after reading a forum post which said someone who had had the same problem, cured it by moving from something like www.domain.example to domain.example instead.

After that everything worked, I started posting from my copy of Movable Type, now safely hosted on www.bods.me.uk, and thought nothing more for a few days until I decided to look into some template changes, and decided to move the hosting back to be on www.planetbods.org instead – I was thinking about using MT’s built in search function and wanted it to appear on the same domain. And I say move – it’s all on the same machine, and there’s just a symlink from each account, with me making a change to mt-config.cgi each time to change the domain it uses. Anyway…

So it’s been moved, and I head in to make my template changes. And the template editor doesn’t work. I reconfigure back to bods.me.uk. It works. I move it to ukmrr.planetbods.org (which is set up to be identical to www.planetbods.org). It doesn’t work. I move it to hitop.planetbods.org (which is a fully fledged, standalone subdomain), it does. I move it back to www.planetbods.org, it doesn’t.

I check the Apache config for the machine – all the domains appear to be set up identically. I look at the .htaccess files on each domain. Nothing hugely weird – just a batch of redirects.

In frustration, I switch off the .htaccess on www.planetbods.org. Suddenly it works! Confused and confuddled, I go through the file. I find RewriteEngine On in there. I remove it. Movable Type works! I put it back. It doesn’t work.

I look through trying to work out why there’s a RewriteEngine On in there, and find the line

RewriteRule ^(.*).html$ /$1.live [R]

Which changes all .html files to .live (for Hitoplive which powers part of this blog – for now anyway). Goodness knows how long that’s been there, and goodness knows what will break if I remove it. I haven’t actually used a flat .html file for something like 6 years I think, but who wants to take a risk in removing it?

In the end I pop a .htaccess in Movable Type’s directory to say RewriteEngine Off and everything begins to work again.

Problem solved. And now I can edit templates. And because I edit templates, I can do all a few changes I’ve been planning… Watch this space then.