Download & Extend

Destination prevents node delete

Project:Node Destination
Version:6.x-1.x-dev
Component:Code
Category:bug report
Priority:major
Assigned:vkareh
Status:reviewed & tested by the community

Issue Summary

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

Comments

#1

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.

#2

I am also experiencing this problem.

My redirect path is "private/member-home"

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

#3

Also having the same issue

#4

Assigned to:Anonymous» vkareh
Status:active» needs review

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!

AttachmentSize
node_destination-967782.patch 2.02 KB

#5

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

#6

Status:needs review» reviewed & tested by the community

The patch in #5 fixes the issue.

#7

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.

nobody click here