This is an object lesson in the importance of the sanity check. I was working on reskinning a MT blog, working on the CSS files when suddenly the posts dissapeared! Well, post actually - it had just been set up, so there was just a single test entry in the system, sitting on the homepage. Mystified, I undid my changes. Still no entries.
I returned everything back to its original state - still no entries. I looked closely at the code to display the code, everything looked fine. I checked on the admin side, and the entry was still there and hadn't been changed at all. I even tried using some demo entry display code from the MT site - nada.
Mystified, I told the client that something weird must have happened, although I had no idea what. That's always I fun thing to tell a client! I couldn't see how it could have been something I'd changed, since all I'd touched was css code... I asked him to have the IT people restore the blog to it's original state.
Of course, a week or two goes by and his IT people have done nothing. He asks me to take another look, so I do. I'm thinking I'll just write dead simple display code - like something that just prints out the name of all entries in the system, and see what happens. Looking over the docs for the MTEntries tag and various related docs, I notice something about it display all entries that meet a certain criteria, or somesuch.
A light bulb slowly turns on, and I wonder if perhaps somehow set it to display 0 entries in the publishing settings in the admin. I look, and nope the number is seven. But then I notice the little drop-down next to the number - and it was set to seven days. In other words, it wouldn't display entries that were more than seven days old.
DUH. I'd never encountered an MT blog set up like that, I don't know if it's the default setting or what. And of course those 168 hours happened to run out on the only entry in the system while I was working on the system, making me think I'd some screwed something up.
So yeah, check the obvious crap first. Usually it's quick, and even if it catches a stupid mistake once, it's worth the time it takes!
I returned everything back to its original state - still no entries. I looked closely at the code to display the code, everything looked fine. I checked on the admin side, and the entry was still there and hadn't been changed at all. I even tried using some demo entry display code from the MT site - nada.
Mystified, I told the client that something weird must have happened, although I had no idea what. That's always I fun thing to tell a client! I couldn't see how it could have been something I'd changed, since all I'd touched was css code... I asked him to have the IT people restore the blog to it's original state.
Of course, a week or two goes by and his IT people have done nothing. He asks me to take another look, so I do. I'm thinking I'll just write dead simple display code - like something that just prints out the name of all entries in the system, and see what happens. Looking over the docs for the MTEntries tag and various related docs, I notice something about it display all entries that meet a certain criteria, or somesuch.
A light bulb slowly turns on, and I wonder if perhaps somehow set it to display 0 entries in the publishing settings in the admin. I look, and nope the number is seven. But then I notice the little drop-down next to the number - and it was set to seven days. In other words, it wouldn't display entries that were more than seven days old.
DUH. I'd never encountered an MT blog set up like that, I don't know if it's the default setting or what. And of course those 168 hours happened to run out on the only entry in the system while I was working on the system, making me think I'd some screwed something up.
So yeah, check the obvious crap first. Usually it's quick, and even if it catches a stupid mistake once, it's worth the time it takes!
Comments