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.
| Comment | File | Size | Author |
|---|---|---|---|
| delete.patch | 515 bytes | brnnrc |
Comments
Comment #1
infojunkieAre you sure the node doesn't get deleted? It does on my installation.
Comment #2
brnnrc commentedNode 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!
Comment #3
infojunkieAh! I understand now. The reason why
node_savegets 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.Comment #4
brnnrc commentedI forgot to say that I'm using pathauto to create automatic aliases.
Comment #5
infojunkieComment #6
bojanz commentedD5 versions are no longer supported (Just like D5 itself).