Project

General

Profile

Task #91381

Updated by Björn Jacob over 2 years ago

It happens quite often that users create form definitions like this: 

 <pre><code class="yaml"> 
 # ... 
 finishers: 
   - 
     identifier: Redirect 
     # ... 
   - 
     identifier: EmailToReceiver 
     # ... 
 </code></pre> 

 Here the @EmailToReceiver@ will never be executed since the @Redirect@ finisher terminates the current (HTTP) request immediately. 

 We should take some countermeasures to avoid this situation or at least give hints that a form definition like this will not give the expected results: 

 * Update the docs to warn about this in the section about finishers in general and for the @Redirect@ finisher in particular 

 Other countermeasures are included 
 * Automatically add the @Redirect@ finisher to the end in #94809. the form editor GUI and keep it there even on finisher redordering 
 * Refactor the code to actually execute the finisher only at the end of the request after all other finishers (this might require new API since 3rd party code will need this too) 
 * Show and/or log a warning if such a form is rendered (this covers hand-written form definitions)

Back