Jay Brewer

Linked Individual Archive Template Being Reset to Default

Vote 0 Votes

We have filed a bug over here: http://bugs.movabletype.org/default.asp?105377

We upgraded to 4.3 to 4.35 and now this seems to happen randomly. It took about 2 weeks for it to happen again so we're not sure why it's happening. The older case was a template tag that caused an error on PREVIEW that used the Individual Entry Archive (our custom one) after the error that template would now be filled with this:

Now we saw this happen again with no ERROR sometime in the last 24 hours. I do know that the save feature on linked templates was updated at some 4.3x release so that on initial save it would make sure and get the edits. Other than that - I'm not sure what tag or error would cause this.

Since it's random and effects our individual archives - yuck. Any thoughts or ideas would be amazing.

Does anyone know where or how it would just overwrite the linked template with:

Maybe a work around would be to put our individual archive template wherever that is coming from? In all the years we've been using MT (7 years +) this is the only problem we've had and without a repro now it's really concerning.

Reported on Movable Type 4.3

1 Reply

| Add a Reply
  • It looks like this default template code is coming from /tmpl/cms/preview_entry_content.tmpl.

    Looking at the code for previewing an entry, I think this bug must occur because of the following code, which is called when the attempt to preview results in an error:

    my $tmpl_plain = $app->load_tmpl('preview_entry_content.tmpl');
    $tmpl->text( $tmpl_plain->text );

    $tmpl here is the actual individual entry archive template. While it's not explicitly saved, if the template is linked to a file on disk, calling ->text causes a flag to be set that makes MT think it needs to be resynced to disk. So I'd guess that some combination of circumstances could cause it to actually perform that sync at the end of the request cycle, resulting in the preview_entry_content template getting written to the disk file and thence to the template in the database.

Add a Reply

If you need to share template code, replace all the "<" signs with "&lt;" or use this utility.

Forum Groups

1774 6167

Last Topic: Template modules by Zielun on Feb 16, 2012

86 302

Last Topic: website entries by masoud on Oct 26, 2011

1434 5088

Last Topic: Maintenance announcement by Nick on Feb 17, 2012

695 2912

Last Topic: Insert Image / File Fails by Russ Miller on Feb 10, 2012

84 291

Last Topic: How to have some other characters in entry basename automatically written by Afshin Haghighatnia on Dec 22, 2011

174 740

Last Topic: Captcha images rendering slowly by ScottM on Feb 12, 2012

190 568

Last Topic: Analytics Reporting by michael webster on Feb 5, 2012

48 210

Last Topic: An idea and also a request by Afshin Haghighatnia on Jun 29, 2011

64 246

Last Topic: jQuery in MT 5.1 still at 1.4 - why? by perlmonkey on May 25, 2011

code.sixapart.com

137 478

Last Topic: Getting a thumbnail with xpath by Peter on Mar 13, 2011

222 720

Last Topic: Custom Field for Asset Not Appearing by android on Feb 9, 2012