terminal42/contao-mp_forms

Defined steps are not available

friederludwig opened this issue · 9 comments

Hello guys,
I get an incomprehensible error when I try to get to the second page of my mp_form ... My logfile throw the following error: "Step "x" is not available!". Interesting abut that is, every time it throws the error, a different step-number is logged (from 4 to 122137 and every number in between :D). I only have two pages created, so I have two pagebreaks in usage. One to divide the two pages and the other at the very end.
Do you get any idea why this error shows up?

[...] request.INFO: Matched route "tl_page.3". {"route":"tl_page.3","route_parameters":{"_token_check":true,"_controller":"Contao\\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","pageModel":"[object] (Contao\\PageModel: {})","parameters":"","_route":"tl_page.3"},"request_uri":".../kontakt?step=122137d1a05f11dcfbb4cc27109199fe","method":"GET"} []
[...] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[...] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Step "122137" is not available!" at .../vendor/terminal42/contao-mp_forms/MPFormsFormManager.php line 142 {"exception":"[object] (InvalidArgumentException(code: 0): Step \"122137\" is not available! at .../vendor/terminal42/contao-mp_forms/MPFormsFormManager.php:142)"} []

How did you manage to get step=122137d1a05f11dcfbb4cc27109199fe in the URL? That doesn't look like an integer step 😄

I am not sure where this string comes from... I had another multipage form installed for testing (advanced form from oveleon) but I deleted the package. Maybe there is something left over from this package which produce this weird string in the step parameter?

Looks like the value is getting hashed somewhere...

Jep. If you can reproduce then please provide the full stack trace so we can see all calls until it gets to MPFormsFormManager.php:142.

Very strange but seems like it's now working... I enabled the debug mode, and now it's working! Maybe something with the cache. I cleared the symfony cache multiple times before with no effect.

Nevertheless, thanks for the quick support! 😄

The only thing I could imagine is if you had some values of the old version in your session. Maybe that caused some trouble here and there but it should certainly work if you delete all the cookies and start from scratch :)

Closing then but feel free to reopen if you find a reproducible issue :)

I have what appears to be an identical case here. Contao 4.9.26 with mp_forms 4.3.1. When switching to the next step there is not ?step=2 etc. but ?step=09484ee6118ecc0dc7c3f9a3e5353111. It´s not possible to get to the second step. When there´s an additional pagebreak i get an error. The content of the log-file:

[2022-02-22 23:47:48] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Step "92" is not available!" at /www/htdocs/v140835/subdomains/domain.de/vendor/terminal42/contao-mp_forms/MPFormsFormManager.php line 145 {"exception":"[object] (InvalidArgumentException(code: 0): Step \"92\" is not available! at /www/htdocs/v140835/subdomains/domain.de/vendor/terminal42/contao-mp_forms/MPFormsFormManager.php:145)"} []

I have the same error.
Cleared cache, restarted computer, tried multiple browsers and computers. Didn't do anything.

[...] request.INFO: Matched route "tl_page.3". {"route":"tl_page.3","route_parameters":{"_token_check":true,"_controller":"Contao\FrontendIndex::renderPage","_scope":"frontend","_locale":"de","_format":"html","_canonical_route":"tl_page.3","parameters":"","pageModel":{"Contao\PageModel":[]},"_route":"tl_page.3","_route_object":{"Contao\CoreBundle\Routing\Page\PageRoute":[]}},"request_uri":"https://domain.com/schulze?step=55e9a95dec0f1bbddc69de2352103601","method":"GET"} []
[...] security.INFO: Populated the TokenStorage with an anonymous Token. [] []
[...] request.CRITICAL: Uncaught PHP Exception InvalidArgumentException: "Step "55000000000" is not available!" at /homepages/0/0/htdocs/domain/vendor/terminal42/contao-mp_forms/MPFormsFormManager.php line 145 {"exception":"[object] (InvalidArgumentException(code: 0): Step "55000000000" is not available! at /homepages/0/0/htdocs/domain/vendor/terminal42/contao-mp_forms/MPFormsFormManager.php:145)"} []