Juergen Posted May 25 Share Posted May 25 Hello @ all On my FrontendForms module, users can add their own custom email templates inside the "email_templates" folder of the module. The problem is that after updating the module, these files are no longer present (only the ones shipped with the module exist). In other words the custom files get lost. During an update the"old" module directory will be renamed with a dot in the front position (.FrontendForms in this case) and the new version will be downloaded from the module directory. After the update, the module files exist twice: .FrontendForms and FrontendForms directory. The old directory contains the custom templates added by the user, the newly downloaded not. Goal: The custom files should be copied from the old folder to the new one. I have tried to use the upgrade function of the module to copy the files from the old folder to the new one, but this does not work properly, because it only happens if the user clicks the button "Continue to module settings" afterwards. Otherwise the files will not be copied to the new version. This is not working the way that I wanted. Is there someone that has created a module which also allows the user to add custom files to the module and has a working solution how to prevent those files to be gone after an update? BTW: I want to prevent storing the custom files outside the module folder (fe. in site/assets/files) if not absolutely necessary. Any help or idea will be appreciated. Thanks Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now