Open ghispi opened 6 years ago
This issue still persists, had the same error on bolt v3.3.9 and boltforms v4.2.1. Is there a quick fix for it, or will it be my setup?
I may have found the error and the solution, please double check it.
extensions/vendor/bolt/boltforms/src/Submission/Result.php does not contain PRE and POST processing in the defined array:
$this->result = [
BoltFormsEvents::SUBMISSION_PROCESS_FIELDS => false,
BoltFormsEvents::SUBMISSION_PROCESS_UPLOADS => false,
BoltFormsEvents::SUBMISSION_PROCESS_CONTENTTYPE => false,
BoltFormsEvents::SUBMISSION_PROCESS_DATABASE => false,
BoltFormsEvents::SUBMISSION_PROCESS_EMAIL => false,
BoltFormsEvents::SUBMISSION_PROCESS_FEEDBACK => false,
BoltFormsEvents::SUBMISSION_PROCESS_REDIRECT => false,
];
Instead it should contan PRE and POST processing too:
$this->result = [
BoltFormsEvents::SUBMISSION_PRE_PROCESSOR => false,
BoltFormsEvents::SUBMISSION_POST_PROCESSOR => false,
BoltFormsEvents::SUBMISSION_PROCESS_FIELDS => false,
BoltFormsEvents::SUBMISSION_PROCESS_UPLOADS => false,
BoltFormsEvents::SUBMISSION_PROCESS_CONTENTTYPE => false,
BoltFormsEvents::SUBMISSION_PROCESS_DATABASE => false,
BoltFormsEvents::SUBMISSION_PROCESS_EMAIL => false,
BoltFormsEvents::SUBMISSION_PROCESS_FEEDBACK => false,
BoltFormsEvents::SUBMISSION_PROCESS_REDIRECT => false,
];
Also extensions/vendor/bolt/boltforms/src/Submission/Processor.php doesn't seem to contain PRE and POST processing in
private static $eventMap
But it did not cause any errors in my env.
I can confirm it, the same on bolt v3.6.4 whit boltforms v4.2.6
The input from jvic works... can we change it in the next releas!?
sure, can you just re-target this PR to 4.2 and not master, then I'll merge and tag.
I have bolt form with post processing on BoltFormsEvents::SUBMISSION_POST_PROCESSOR. Forms show correctly, its correctly validated, if not valid correct messages show but if form is valid it fails just after mine post processing. I've tried with feedback.success and feedback.redirect both fails the same way:
join_page_form.twig:
boltforms.bolt.yml:
It doesn't seem that boltforms/src/Submission/Result.php work with SUBMISSION_POST_PROCESSOR. Please advice if its my error in config or issue with bolt forms and how to deal with it.
Versions: bolt/bolt: v3.3.6 bolt/boltforms: v4.1.13