Opened 9 years ago

Closed 8 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: master
Severity: Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:



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 (, and I received no responses within 24 hours.



Attachments (2)

make_next_redirect_apply_across_comment_preview.diff (530 bytes) - added by Jeff Winters <micand7@…> 9 years ago.
next_redirect_via_comment_preview.diff (1.7 KB) - added by Kevin Fullerton 9 years ago.

Download all attachments as: .zip

Change History (6)

Changed 9 years ago by Jeff Winters <micand7@…>

comment:1 Changed 9 years ago by Chris Beaven

Needs tests: set
Triage Stage: UnreviewedAccepted

Hey Jeff, would you like to have a crack at adding a test case to show the current failure (in `tests/regressiontests/comment_tests')?

Changed 9 years ago by Kevin Fullerton

comment:2 Changed 9 years ago by Kevin Fullerton

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 Changed 9 years ago by SafPlusPlus <freark@…>

Needs tests: unset

comment:4 Changed 8 years ago by Jannis Leidel

Resolution: fixed
Status: newclosed

I believe this has been fixed in [11019].

Note: See TracTickets for help on using tickets.
Back to Top