I have a custom module referenced in a template with {cms_module module='mymodule'}. After upgrading to 1.11.2 (from 1.9) when I try to save the template from the template editor it runs the action.default.php page of that module.
I was under the impression that the action.default.php was only invoked when on the site not when saving a template. I believe from walking through the code that smarty is attempting to compile my code. Is this for caching? My modules were made quite a while back. Am I missing a property that would stop this from happening?
Thanks!
Troy
Custom module breaking template save
Re: Custom module breaking template save
You might want to read the What We Broke part of this...
http://forum.cmsmadesimple.org/viewtopi ... =1&t=57370
http://forum.cmsmadesimple.org/viewtopi ... =1&t=57370
Re: Custom module breaking template save
Thanks for the reply. I went through the list of possible issues and my modules appear pretty clean.
I decided to compare an existing module to see if I was doing something wrong. I loaded a template with: {cms_module module='Printing'}. This module as well has the action.default.php script processed during the saving of a template. I'm not sure to what benefit but my guess is some form of compilation by smarty for processing later?
My module looks at the current url and loads a 'dealer' based on the url. If a dealer isn't found it redirects the page. Since I'm using the admin url we don't have a dealer and the redirect is physically processed by saving the template and off I go to another page.
My guess is this will cause some unforeseen problems in the future.
Troy
I decided to compare an existing module to see if I was doing something wrong. I loaded a template with: {cms_module module='Printing'}. This module as well has the action.default.php script processed during the saving of a template. I'm not sure to what benefit but my guess is some form of compilation by smarty for processing later?
My module looks at the current url and loads a 'dealer' based on the url. If a dealer isn't found it redirects the page. Since I'm using the admin url we don't have a dealer and the redirect is physically processed by saving the template and off I go to another page.

My guess is this will cause some unforeseen problems in the future.
Troy