default userpic

Editor eats templates text

Vote 0 Votes

I has happened to me several times, I wonder if other people have experienced this (scary) behaviour. Sometimes the editor seems to “eat” the template, i.e. it saves in the database a blank text. Tipically, I’m editing a template, I save and publish , cant see the changes, and when i reload the template in the editor… oooops the text is gone (and the template is marked as ‘disabled’ in the templates list). It’s not that the browser has problems showing it, I look inside the database and the template_text field is actually empty. This sucks badly, as you can imagine. I use Firefox 3, MT 4.23

Reported on Movable Type 4.2

5 Replies

| Add a Reply
  • I had something similar once in 4.2 after I copy & pasted some text into a template. The template didn't show up as disabled though. Must have been some bad characters, in the end I deleted the template and started again.

  • Yes, I've also experience a lot of funny behaviour when copy-pasting inside the template editor. Both in Firefox and IE.
    And lots of (seemingly random) blank lines suddenly appearing and disappearing, for example, when pressing the Delete key. I highly suspect that this is related to the "Syntax Highlight" feature, some parsing issue.
    I now disable syntax-highlight off while editing, perhaps this should be the default behaviour.

  • Yeah sometimes it's blank, or it's either half missing or all compressed on one line... I've had this happen enough times that I leave tabs with templates open after saving code.

    You can usually use the back menu to jump over the previous save to an earlier state of the template and grab the code pre save to copy it.

  • I've had this happen several times recently (MT 4.25) - very frustrating. Hitting back didn't retrieve it and I don't know of any version control to undo the damage. I lost a bunch of work the other day - luckily my rewrite was more efficient than my original. In some cases, I've been editing code in a separate text editor and then pasting it from there to be safe.

    I also think it might have something to do with the Syntax Highlighting (Codepress), and probably also with pasting into the editor while syntax highlighting is turned on. When the highlighting is turned off it seems like it doesn't happen.

  • It is raised as a bug

    Invisible control character causes truncation of template
    http://bugs.movabletype.org/default.asp?90901

Add a Reply

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

Forum Groups

1773 6162

Last Topic: Excluding categories from blog by kholechek on Feb 9, 2012

86 302

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

1429 5077

Last Topic: What apocalypse hit this community in the middle of 2011? by 75th on Feb 10, 2012

695 2910

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

173 737

Last Topic: About the MT version stated in HTML source by Alex E. Schneider on Feb 7, 2012

190 567

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