Opened 15 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)

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

Download all attachments as: .zip

Change History (6)

by Jeff Winters <micand7@…>, 15 years ago

comment:1 by Chris Beaven, 15 years ago

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')?

by Kevin Fullerton, 15 years ago

comment:2 by Kevin Fullerton, 15 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 SafPlusPlus <freark@…>, 15 years ago

Needs tests: unset

comment:4 by Jannis Leidel, 15 years ago

Resolution: fixed
Status: newclosed

I believe this has been fixed in [11019].

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