Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Post / Redirect / Get (prg) plugin not working well, when form validation fails #7464
I encountered a bug in prg controller plugin, easily testable with zfcuser.
Try to register a new user on the /user/register page, use a 4 character password.
The form element "password" has a StringLength validator of minimum 6 characters: https://github.com/ZF-Commons/ZfcUser/blob/1.x/src/ZfcUser/Form/RegisterFilter.php#L78
In register action you can see the usage of $this->prg :
If I modify registerAction and remove $this->prg and go with 'traditional' approach:
Then validation messages are returned, and previously filled email address is filled in the form.
Anything I'm missing here, and it's a Zfcuser bug? If yes, give me a clue, please.
Your description sounds exactly like the one in this bug report: ZF-Commons/ZfcUser#158
Perhaps you can open a topic on StackOverflow for this to determine what is going wrong? If it is indeed a bug you can open an issue at ZF-Commons/ZfcUser and when it actually is a bug in ZF2 you can open an issue here
@Martin-P thank you for your answer, I tried to be very careful before submitting the issue.
I made a minimalistic demonstration repository can you please check it out?
I hope that helps, I tested this on:
All the best,
Have you got any solution on it as i am struggling on the same - Please help