verbb / formie

The most user-friendly forms plugin for Craft CMS.
Other
93 stars 69 forks source link

Error when redirecting to an entry upon submission #1842

Closed amphibian closed 2 months ago

amphibian commented 2 months ago

Describe the bug

When setting a form to redirect to an entry upon successful submission, Craft encounters an error: "Request contained an invalid body param." The param in question is the "redirect" param.

In the form, the redirect param looks like this:

<input type="hidden" name="redirect" value="715fefc11fb981f98bdfaafe957525fa60ff748d83f3509e98bf5316e47f6063http://test.local:5757/activities/debrief">

I tried with a "URL" redirect pointing to the same entry and that worked.

Steps to reproduce

  1. Create a form which has "redirect to entry" as its submission behaviour, and select a valid entry there.
  2. Submit the form.

Form settings

Craft CMS version

5.0.4

Plugin version

3.0.0-beta.8

Multi-site?

No

Additional context

No response

engram-design commented 2 months ago

Strange, the redirect param is supposed to look like that, because it's verified when being visited. This prevents tampering and is used throughout Craft.

I can't seem to replicate this with either submission method, and with a variety of linked-to entries. Was this a public live entry out of interest?

amphibian commented 2 months ago

Oddly enough I juts migrated from local to staging, and the error went away. Must have been something finicky about my local ddev environment, or possibly a weird browser cache issues? Nonetheless, all seems to be working now, sorry for the false report!

engram-design commented 2 months ago

All good, good to know!