ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Wrong template loaded

December 11, 2010 6:40am

Subscribe [3]
  • #1 / Dec 11, 2010 6:40am

    Laisvunas

    879 posts

    It seems that in some cases template manager loads a wrong template.

    Consider such sequence of steps:

    1) user creates template named “template1” in template group “my_templates”;

    2) user creates template named “template2” in template group “my_templates”;

    3) user types a string “code1” in template1 and checks “Save Template as File” and clicks “Update” button.

    4) user types a string “code2” in template2 and checks “Save Template as File” and clicks “Update” button.

    5) user deletes template1;

    6) user renames template2 and gives it the name “template1”.

    Now user expects that the template having the name “template1” has inside the string “code2”, but when he opens it he finds the string “code1” instead.

    Is it the right behavior? Or maybe it is a bug? template1 was deleted, its code should have been destroyed, so why its code shows up when template2 was renamed?

    I use EE v1.7 build 20101018.

  • #2 / Dec 13, 2010 1:09am

    John Henry Donovan

    12339 posts

    Laisvunas,

    This has always been the behaviour I believe. When you delete a template via the cp you don’t delete the flat file. So the moment you renamed template2 back to template1 you hooked up the other the flat file.

    To avoid this you will need to delete the flat file along with the db template

    Does that help?

  • #3 / Dec 13, 2010 7:41am

    Laisvunas

    879 posts

    Thanks, John.

    The thread can now be closed.

  • #4 / Dec 13, 2010 4:09pm

    Ingmar

    29245 posts

    Thanks for letting us know. Please post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases