Defining "destinantion" in query string isn't working for comment's forms.

Apparently destination becomes an form's attribute (which doesnt work);

It should work after comments previews either.

Comments

sime’s picture

Hi ppacheco

Can you please provide more information.
Are you speaking about "destination" in the context of theme_comment_post_forbidden()?

Thanks, Simon

pacheco’s picture

hi simon,

no, you can reproduce that by trying something like:

http://www.example.com/comment/reply/101?destination=otherpage

you get a form tag like that:

form action="/comment/reply/101" method="post" id="comment_form" destination="otherpage" id="comment_form"

destination becomes an attribute
if you preview your post, destination gets lost
but even if you don't preview, it doesn't redirects to the desired page

comparing with a forum node form:

http://www.example.com/node/add/forum/9?destination=otherpage

you get:

form action="/node/add/forum/9?destination=otherpage" method="post" id="node-form" enctype="multipart/form-data"

if you preview and submit, ou just submit, it works, redirecting as needed.

Some observations:

I've "worked out" my specyfic problem using form_alter to place an edit[destination] hidden field inside my comment's forms.

This "destination" parameter is not used for comments anywhere in core (if not so, someone would have noted, i think), so it feels like a "feature request", but i seems like easy to solve and the behavior "should" be consistent, IMHO.

tks!
Pacheco

Egon Bianchet’s picture

Version: 4.7.0-beta6 » 4.7.0

Still active

magico’s picture

Version: 4.7.0 » x.y.z

Confirmed at ?q=comment/reply/7&destination=otherpage#comment_form

magico’s picture

Version: x.y.z » 5.7
Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.