Zielun

Template modules

Vote 0 Votes

Hi

When I create a template module its content is deleted when I'm trying to publish the template (refresh the template). I receive msg: "Refreshing template Entry Form with backup".
How to switch this behaviour and allow to keep my changes instead of restoring it from backup?

Thanks for suggestions.

Reported on Movable Type 4.3

7 Replies

| Add a Reply
  • Ok, I misunderstood how save button and refresh works.
    Thought when template is saved it is saved. However, it still needs to be published to be permanently saved in the system.
    Otherwise template refreshing takes stuff from the backup and restore the previous version.

    Works logical when you know it :)

  • Hi,

    You've got the idea!

    What you should know is that one of the key movable type feature is its static publishing, which basically generates each and every web page as a physical .html file on the server.

    From that moment each page generated by movable type is displayed on its own, without depending or inquiring the mysql database behind movable type.

    That's excellent because if the mysql server would start having a problem or if the database is deleted (some very low quality hosting services are doing that from time to time), you still have at least a working website and you still have the means to start to reconstruct the site backend.

    When you create or save a template, you should know that the data is recorded on the database behind movable type.

    However, if you have the templates publishing in "static" mode (the default), you should know that you will have to also rebuild/publish/republish that template for your changes to be reflected on your blog or website pages.

    Until you republish your blog, those changes won't show up on your site pages.

    And what the "refresh templates" function does is that it simply overwriting your templates with the default templates from that very template set. When you use that function, you're going to loose any extra templates you've created or all the customizations from the templates you might have changed to match your needs.

    Movable Type could publish templates also using other publishing methods, such as the "Dynamic" one, which would reflect your changes right away (without rebuilding), but in that case the site would rely on your database, which I won't advise. Why shouldn't you benefit from the key function of movable type, which is the "static publishing" method?

    Kind Regards,
    Mihai Bocsaru

    ----------------------------------
    Daily Movable Type Consultant

    Web Development
    Movable Type Consulting
    Six Apart Partner

    http://www.pro-it-service.com/
    ----------------------------------

    Movable Type Demo
    http://www.movabletypedemo.org/

  • Thanks for details Mihai

    However I noticed one more thing which effect is similar to the one which I described at the begining. I mean template module content is empty. This time I created a plugin/theme so all files should be created as ddescribed in config.yaml. They do except for one file :)

    Although file to be created contains full content (html+js) is created during plugin installation and theme change process with nothing inside. It's empty.
    It's weird because everything else (other template modules as well) works like charm.
    Maybe you have a clue on top of your head what might be the problem? I checked filename, path to the file, etc.

    I had to manually paste the content to the module in admin panel to make it work.

    Thanks

  • It should be something related maybe to special characters in the template module name.

    I recall that I've had a similar problem in v4.x with a dash or maybe parenthesis.

    Cheers,
    Mihai

  • Ah, so in order to save permanently you must publish it. Cheers Zielun.

  • This is really an excellent Blog ; and very informative information there - I've read. Really very useful all of them. I like them a lot. Hope - we'll get more this type of information in future days. Thanks.

    For any kind of /">Web Designers Sydney - contact with me...


  • This is really an excellent Blog ; and very informative information there - I've read. Really very useful all of them. I like them a lot. Hope - we'll get more this type of information in future days. Thanks.

    For any kind of /">Web Designers Sydney - contact with me...

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