Bug 40240 - Improve visibility for error when saving notices
Summary: Improve visibility for error when saving notices
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 31211
Blocks:
  Show dependency treegraph
 
Reported: 2025-06-25 12:03 UTC by Marion Durand
Modified: 2025-06-25 12:04 UTC (History)
0 users

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marion Durand 2025-06-25 12:03:39 UTC
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.