Why is Movable Type suffixing my stylesheet?

53 views Asked by At

I am trying to restore a blog running a... vintage version of Movable Type (4.25). I'm running into an issue where the index stylesheet template isn't loaded whenever I load a page. The browser gets a 500 trying to access styles-site.css, which I don't blame it for, since the web root does not contain a styles-site.css. It does, however, contain a styles-site.css.static, and when I rename it to styles-site.css, the page works fine.

This is the configuration for the template that is (I believe) generating the file. As you can see, publishing is set to static, and the output file is styles-site.css. Yet, when I publish, it will put the content instead in styles-site.css.static, and nothing will be able to find it. Also, the View Published Template link to the right is a link to styles-site.css, so even Movable Type seems convinced that the file should be there. And yet... It doesn't generate it there. It generates styles-site.css.static, and if I rename that to remove the static, the site will work until I republish, at which point styles-site.css will be removed and styles-site.css.static will be put back.

Any ideas on what's causing this or if there's a setting I can tweak? Thanks in advance for your help.

1

There are 1 answers

0
Chris Fincher On

Self-resolved:

I snooped around the MT code for something that appends .static to a string, and found something in WeblogPublisher.pm. It appends .static to filenames a couple times, but both of them check to see if the thing being published that they deal with is being statically or dynamically published. I thought this was bizarre because I specifically statically published this stylesheet.

I fired up phpMyAdmin and looked at the templates table. The dynamic flag was enabled for the stylesheet template, so I set it to zero and republished. Stylesheet is present!