I'm creating a user profile form on the front-end of our website. I've removed all template code and replaced it with the documentation code from the Craft website. I updated the docs code to reflect fields that we're using, rather than the example fields.
Upon clicking the Save Profile button, the next thing I get is this error:
**Bad Request**
POST param “redirect” was invalid.
I've changed the redirect action input to multiple values, but none work.
I'm running Craft 2.6.3008.
Update: Here's the form:
<form method="post" accept-charset="UTF-8">
{{ getCsrfInput() }}
<input type="hidden" name="action" value="users/saveUser">
<input type="hidden" name="redirect" value="account/profile?m=updated">
<input type="hidden" name="userId" value="{{ currentUser.id }}">
<label for="firstName">First Name</label>
<input type="text" id="firstName" name="firstName" value="{{ currentUser.firstName }}">
<label for="lastName">Last Name</label>
<input type="text" id="lastName" name="lastName" value="{{ currentUser.lastName }}">
<input type="submit" value="Save Profile">
</form>
The form is located at account/profile. I'm asking it to return to the same template, just with a parameter appended to the address to verify the form was updated.
SecurityManager
line 298 fails. I'm not 100% sure if parameters are allowed the way you are going to use it. I never tried such a thing like you and always used proper routing rules or proper post parameters to check if the form was submitted. Could you try to remove the parameter and tell me if it works then? If so I'll answer how to check if a form was submitted with twig or not