[Ur] Redirecting to the same page with a form, getting "wrong cookie signature"

Daniel Patterson dbp at dbpmail.net
Sun Jul 28 15:33:04 EDT 2013


I have a form that is used for editing an entry. I want to be able to
both save the entry and continue editing and also save and return to the
index. Since multiple submit buttons aren't supported (how I would
normally implement this pattern), the solution I came up with was having
a checkbox for whether to continue editing, and then just redirect back
to the editing page.

This works the first time - the entry is saved, and the edit entry page
loads again, but when I try to submit on this reloaded page, I get a
"Fatal error: Wrong cookie signature" error. The code that produces this
is at:

form:   https://github.com/dbp/latinamerica/blob/master/la.ur#L236
submit: https://github.com/dbp/latinamerica/blob/master/la.ur#L309

I know it isn't as simple as I describe, because I created a minimal
example of that and it works just fine. That example is here:

https://gist.github.com/dbp/6099783

But, I'm not sure what could be causing that error, so I'm not sure how
else to approach minimizing it.

Any advice for either potential causes (to aid minimizing) or a reason /
fix for it would be great!

Daniel



More information about the Ur mailing list