1

I use a front-end entry form based on the official documentation (https://craftcms.com/docs/templating/entry-form), but after saving the entry, I am running in an error 404 on the entry page.

<input type="hidden" name="redirect" value="viewentry/{id}">

But if I replace the entry id with the slug in the browser (example.com/viewentry/example), then it works.

1 Answer 1

1

Try replacing {id} with {slug}. I guess it needs a slug, not an ID.

2
  • You're right - and the docs probably wrong. Thank you very much!
    – MISC
    Commented Jul 29, 2016 at 14:18
  • Glad I could help :)
    – Gustavs
    Commented Jul 29, 2016 at 14:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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