‘_1’ in MovableType Basenames
Posted September 21st, 2005 @ 09:16am by Erik J. Barzeski
Several times since upgrading to MovableType 3.2 at The Sand Trap .com, basenames have included a "_1" at the end. I have no idea why, and it's frustrating to have to go through and edit the basename and change the URL of any TrackBacks.
If I could understand why MovableType keeps putting "_1" perhaps I could tell the staff how to avoid getting it (because remembering to check for it has proved futile). Entries are not named the same as previous entries, so that's not the issue. What causes MovableType to append "_1" to the basenames?
Posted 21 Sep 2005 at 11:54am #
Just an idea and I'm sure you looked into it but... maybe the entry has a tile that has a space on the end... "Example Entry Title "
Posted 21 Sep 2005 at 6:53pm #
I've noticed this, too - MT putting '_x' after basenames that are not duplicates of existing basenames. I started digging around in the MT code a bit, and while I haven't come up with a conclusive answer, I'm guessing that it may be a bug related to saving an entry and changing its status. Normally, MT only appends the '_x' to a basename if it has found an existing (presumably previous) entry in the same blog that has the same basename as the one currently being saved. So my guess is that this bug is happening because at some point the current entry has already been saved to the database, but then at a later point (perhaps when re-editing or updating the status), MT thinks it needs to generate the basename again. It sees the one it has already saved, and generates a new basename with '_x' appended. Then it saves the entry again.
I have to dig into the code a bit more to see when and where exactly this is happening, but I think I'm on the right track. Let me know if you hear anything else about this.
Posted 22 Sep 2005 at 6:50pm #
I think changing the status is right. MovableType seems to think it's a new entry, or it seems to check the basename before it's realized you're replacing the old one.
More research is necessary here, but that seems to be the case. That was my hunch too, Peter.
Posted 23 Sep 2005 at 9:41am #
I've received a response from Six Apart support regarding this issue:
However, since Erik is using ecto, he is not using the 'Preview' function. This may be a related bug. Or perhaps it is the same bug, and Six Apart just hasn't discovered other methods for reproducing it.
Posted 06 Oct 2005 at 9:21am #
Similar problem here with dynamic publishing using Chad Everit'z MT-Notifier. The entry is saved, a notification is sent out to users with the standard base name, but when they recieve it and click on it, the file doesn't exist. If I saved it as unpublished first, then published it, I didn't get an appended basename. At first, I thought it was a problem with MT-Notifier, but it seems like it might fit in to this overall bug?
Posted 06 Oct 2005 at 9:25am #
That may be. The issue seems to be a threading issue, or an order of operations type of an issue. If the entry "posts" to the MovableType script before MovableType realizes it's an edit and not a new entry, then the _1 problem would rear its ugly head.
Posted 26 Jan 2006 at 5:36pm #
MT basenames
Just a bit of Movable Type administrivia, which I'm posting in case anyone else has this problem: ever since I upgraded to the latest version of MT several months ago, I've noticed a bug in which MT will sometimes unnecessarily...