When I press the node's delete button on the edit form, the redirect kicks in and the node does not get deleted.

CommentFileSizeAuthor
#4 node_destination-967782.patch2.02 KBvkareh

Comments

alexkb’s picture

Hi bkno, I've just tried to replicate this issue, but don't seem to be able to. What sort of url are you setting in the 'Path to destination' field.

Thanks.

bryancasler’s picture

I am also experiencing this problem.

My redirect path is "private/member-home"

I'd be happy to answer/troubleshoot anything for you.

khalor’s picture

Also having the same issue

vkareh’s picture

Assigned: Unassigned » vkareh
Status: Active » Needs review
StatusFileSize
new2.02 KB

This is actually an easily reproducible issue: the $form['#redirect'] fires on any type of form submit. Clicking on the Delete button is a form submit, hence the redirect.

I added a submit callback just to the Save button ($form['buttons']['submit']['#submit'][]), so that the redirect can be added in $form_state['redirect'].

Please test and let me know. Thanks!

vkareh’s picture

edit: The patch is not linking properly. Here it is: http://drupal.org/files/issues/node_destination-967782.patch

khalor’s picture

Status: Needs review » Reviewed & tested by the community

The patch in #5 fixes the issue.

fuerst’s picture

Just a hint: don't forget to redirect after deleting a node too by adding a $form['#submit'][] = 'node_destination_redirect'; to the node_delete_confirm form.

Dharmendra.s’s picture

good patch thanks....