Opened 16 years ago
Closed 15 years ago
#11110 closed (fixed)
Comments redirect after posting is not honoured if comment contains errors or is previewed
Reported by: | Jeff Winters | Owned by: | nobody |
---|---|---|---|
Component: | contrib.comments | Version: | dev |
Severity: | Keywords: | ||
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hello,
In using the comments framework, I have experienced some odd behaviour with regard to the "next" redirection. Provided that one specifies a value for "next" as part of the context for the template that contains the comment form, users posting valid comments without previewing them will indeed be redirected as expected. However, if the commenter previews his comment before posting, or if his comment contains errors, the "next" value is not honoured -- the user is redirected to the default "Thank you for your comment" page.
For what it's worth, my use of the comments framework is extremely simple -- within my template, I use {% render_comment_form for post %}. "next" is passed as part of the template context from within the view.
Attached is a simple patch that resolves the issue for my use of the comments framework. I fear that my issue may not be a bug at all and that I'm missing something obvious, but I took the precaution of asking about it on django-users (http://groups.google.com/group/django-users/browse_thread/thread/2f6768b95cb9a10e), and I received no responses within 24 hours.
Thanks,
Jeff
Attachments (2)
Change History (6)
by , 16 years ago
Attachment: | make_next_redirect_apply_across_comment_preview.diff added |
---|
comment:1 by , 16 years ago
Needs tests: | set |
---|---|
Triage Stage: | Unreviewed → Accepted |
by , 16 years ago
Attachment: | next_redirect_via_comment_preview.diff added |
---|
comment:2 by , 16 years ago
Added patch which contains the fix for revision 10957 as well as test case - not sure why the diff isn't showing (is the output from svn diff)
comment:3 by , 15 years ago
Needs tests: | unset |
---|
comment:4 by , 15 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
I believe this has been fixed in [11019].
Hey Jeff, would you like to have a crack at adding a test case to show the current failure (in `tests/regressiontests/comment_tests')?