Help - Search - Members - Calendar
Full Version: Entry Archive Mapping Can Break Preview
Movable Type Community Forum > Other Product Discussion > Bugs and Odd Behavior
BloggyThingy
This is a follow-up to this thread. I'm posting in here because I've now been able to reliably reproduce this behavior in MT4.01.

Under some circumstances, the creation and/or deletion of an archive map on the Entry template breaks the entry Preview such that the display does not use MT4's "in context" preview, and instead only displays the text of the entry across the full width of the browser, with conventional system buttons for Save and Re-Edit (more like the way previews worked in MT3.x.)

Here's the recipe for breaking and then fixing the Entry Preview. (I have not tried this using Page-type archive maps.)

My Entry template has one archive map: The 'type' is Entry, and the path format is the default yyyy/mm/entry-basename.html.

I clicked the Create Archive Mapping link and created a new archive map of type Entry. After a moment, the second archive map is displayed, using the same default path format. In the Type column there are now check boxes (there were none when there was only a single map), and the first map in the list is checked. At this point, Entry Preview is still working correctly.

I delete the first archive map in the list (this is the one with the check box, which previous tests indicate is the new map I had just created.)

Entry Preview is now not displaying correctly.

On the Entry template, I again create an archive map, accepting all the defaults. This time, although check boxes are added in the Type column, neither is checked.

Preview is still broken. Note that when I click the 'Re-Edit this Entry' button, MT actually publishes it -- in this broken display, the Re-Edit button is on the left, the Save button to its right, which is opposite how they are on the correct display. There is a also a Cancel button, to the right of the Save button, which when clicked also triggers publishing.

Back at the Entry template, I check the box next to the second map, and delete the first one -- I am NOT asked to confirm the deletion (suggesting that this map has not been fully registered with the system?)

Preview is still broken.

I now delete the one remaining template map, this time getting a confirmation prompt, and I am left with no archive mappings.

Preview is still broken.

I create a new template map, of type Entry.

Preview now displays correctly.

Note that a no point in the process have I used the Save button on the Entry template to explicitly save the template; as far as I can tell, map creation doesn't require that the template itself be saved (for example, after exiting and reloading the unsaved template, the new map is still there, and the new map appears in the Rebuild windows list box, and you can exit the unsaved template without getting a confirmation; but perhaps not saving is part of the problem?) Also, at no point in this process have I done any rebuilding (though I have confirmed the creation and deletion of the maps in the Rebuild window's list box.) I've been moving between the Entry Template, and the Entry and Preview pages, using two browser tabs, so at no point has there been a full from-scratch reloading of either.

I've repeated this process three times since I first got a sense of what was happening, and each time I've been able to break and then fix how the Preview displays.

I don't understand what's actually going on behind the scenes. But it seems that somehow the creation and deletion of a second identical entry map, of type Entry (again, I did not try this with a type Page map) can cause the Preview to get discombobulated, as though it can't find any valid Entry mapping, which causes it to lose its link to the style sheet (or to something) that produces the new MT4-style Preview page. (I imagine that the lack of a confirmation prompt when deleting one of the maps holds a key to what's going on.)
OtherNiceMan
Have you reported this as a bug? http://www.movabletype.org/feedback.html
Marcia-UK
I followed your steps deleting and creating archives maps but that broken preview (with Re-Edit, Save and Cancel buttons) wouldn't go away.

Then I've found the solution in this thread:

http://forums.sixapart.com/index.php?showt...&hl=preview

where SmartGoat suggets:

QUOTE
I had this as my archive mapping for Entry archives:

/yyyy/mm/dd/entry-basename/index.html

I created a new archive mapping, chose "Custom" mapping, and typed in this:

/%y/%m/%d/<$MTEntryBasename separator="-"$>/index.html


It worked fine for me. So I decided to post it here just in case someone else gets stuck in the same way I was.

Thank you anyway for your help.

wink.gif

BloggyThingy
QUOTE (OtherNiceMan @ Jan 19 2008, 03:14 PM) *
Have you reported this as a bug? http://www.movabletype.org/feedback.html


I had not. I was waiting to see if others were experiencing the same or similar. The thread linked in an earlier post indicates that others were having similar problems and that SA says it was a "known issue with people using non-default archive mapping." In my case, the mappings were the default ones. I'll report it with a link to this thread and the steps I took to reproduce the behavior.
PeteoFun
What are the checkboxes for? I can't find any documentation on them.
Su-
When you have multiple mappings of the same type, eg. two Entry mappings, the checked box indicates the preferrred one. So, again if you have two Entry mappings, <$mt:EntryLink$> will by default point at the one that is checked.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.