1

I have a frontend Entry Form that will not save an entry and goes to a 404 page.

Basically i have this:

<form method="post" accept-charset="UTF-8" enctype="multipart/form-data" class="add-a-resource__form">
{{ getCsrfInput() }}
<input type="hidden" name="action" value="entries/saveEntry">
<input type="hidden" name="redirect" value="/resources/thank-you">
<input type="hidden" name="sectionId" value="4">
<input type="hidden" name="enabled" value="1">
<input type="hidden" name="typeId" value="4">
<input type="hidden" name="fields[topContent]" value="test">
</form>

And in the log in the session array i have:

'9df612913c35fa7bdbde58405537f412__timeout' => 1479139200,
  '9df612913c35fa7bdbde58405537f412Yii.CWebUser.flash.error' => 'Couldn’t save entry.',
  '9df612913c35fa7bdbde58405537f412Yii.CWebUser.flashcounters' => 
  array (
    'error' => 0,
  ),

I am logged in as an admin so have permission to write to the channel, the details are right in the hidden fields, but when i submit the form, it goes to a 404 page no matter what i put in the redirect input.

Any ideas?

1

Right, the issues was that there was a validation error on a field, but the form didn't reload and display those errors, it just went to a 404 page.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.