Do not show success message when trying to save a model that contains errors
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3302292. -->
Reported by: [rkoller](https://www.drupal.org/user/3217695)
Related to !212
>>>
<p>Currently the admin messages give a wrong impression if a model was successfully saved or not: </p>
<p><a href="https://www.drupal.org/files/issues/2022-08-07/successful_save.png" title="an eca model was saved with a successfully saved model status message and two error messages at the same time"></a></p>
<p>I've set up a model with two StartEvents, one Task, and saved. After that I've added two Flows. each with the <code>Tamper: Find replace REGEX </code>template. If i save the model i get the admin notices shown in the screenshot above. From a usability standpoint those messages are misleading. The overall dominant message is the green status message "successfully saved the model". Me as a user assume, in case i even read any further after i'Ve scanned the first green status message that the model was successfully saved, that i could tackle the two errors at a later point, and the other changes to the model are applied and saved. but as i've initially learned in here <a href="https://www.drupal.org/project/bpmn_io/issues/3302271">https://www.drupal.org/project/bpmn_io/issues/3302271</a> as soon as the action mentioned is in and isn't properly set up no changes are saved at all in general. Which is a potential source for data loss for the user in the worst case. </p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>- Remove the "successfully saved the model" status message.<br>
- Perhaps unify the admin notice into a single message? A suggestion for the error text could be: </p>
<p><strong><em>singular:</em></strong></p>
<p><strong>Error message</strong><br>
The model could not be saved. The following problem that prevents saving needs your attention: </p>
<ul>
<li>action "Tamper": Find replace REGEX" (Flow_1vue8i3): Invalid regular expression. </li>
</ul>
<p><strong><em>plural:</em></strong></p>
<p><strong>Error message</strong><br>
The model could not be saved. The following problems that prevent saving need your attention: </p>
<ul>
<li>action "Tamper": Find replace REGEX" (Flow_1vue8i3): Invalid regular expression. </li>
<li>action "Tamper": Find replace REGEX" (Flow_1fx5wc2): Invalid regular expression. </li>
</ul>
issue