Bug 31211 add a validation system to detect error in notification template when saving. Currently, it displays a message for certain type of fault, but the error message is really easy to miss. It is an additional message on the page, not a modal, and it doesn't prevent to save. So if you just click on "Save", it will save and take you back to the list of all notices without showing anything. If you click on "Save and continue editing", you then have to display again the message transport type just updated to see the error. So you need to be actively looking for the message to see it. We could probably use a modal that warn about the error and offer a choice between saving as it is or go back to editing. To reproduce : 1- Go to Tools > Notification 2- In any notification template, enter the following model (note the missing END) ``` Hello, [% FOREACH biblio IN biblios %] ``` 3- Click on "Save and continue editing", you stay on the same page but the section (message transport type for instance Email) is now collapsed 4- Click on the section you just edited, you now have a field "Template Toolkit error" that warn about the error 5- Repeat setp 1 and 2 6- Click on "Save" 7- You have not been warned about the error 8- Go back to the same notification, and click the appropriate section, the warning is still there.
A modal that warned the user at saving and allowed them the option to go back to editing would be very helpful. When editing notices, it is really easy to forget a small detail, like an % in the [% template toolkit. If you have an error, it can cause notices to stop sending altogether. So if you save your work and then don't go back to double check for any error messages, you can easily cause a pretty big problem for your system. Another way of avoiding this could be if saving changes kept you on the page you were editing instead of taking you back to the list of notices and slips.