In _views_bulk_operations_action_do, you have:

if (_views_bulk_operations_is_actions_6()) { // Drupal-6-style actions
actions_do($action['callback'], $node, $context);
node_save($node);
}

So, it calls node_save and rebuilds the path alias just deleted.

Here you hava a stupid patch.
Thanks fori your great job.

CommentFileSizeAuthor
delete.patch515 bytesbrnnrc

Comments

infojunkie’s picture

Are you sure the node doesn't get deleted? It does on my installation.

brnnrc’s picture

Node gets deleted! The path alias gets deleted and then recreated.
You can find all the aliases pending in the db table 'url_alias'.
The node doesn't get recreated because the node_save() calls an 'UPDATE ... where nid=x' and the row with nid=x is deleted. So nothing happens.
The alias gets dropped before the node_save() and recreated during the node_save() (with an INSERT) instead.

The question is: why the node_save() is called during a delete operation?

thanks!

infojunkie’s picture

Assigned: Unassigned » infojunkie

Ah! I understand now. The reason why node_save gets called is that VBO has no way of differentiating between delete and any other action. This function needs to get called to commit the result of actions that modify nodes. I will search for a workaround in the case of delete action specifically.

brnnrc’s picture

I forgot to say that I'm using pathauto to create automatic aliases.

infojunkie’s picture

Component: Code » Actions
bojanz’s picture

Status: Active » Closed (won't fix)

D5 versions are no longer supported (Just like D5 itself).