Download & Extend

action "delete" delets aliase and recreates it

Project:Views Bulk Operations (VBO)
Version:5.x-1.3
Component:Actions
Category:bug report
Priority:normal
Assigned:infojunkie
Status:closed (won't fix)

Issue Summary

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.

AttachmentSize
delete.patch515 bytes

Comments

#1

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

#2

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!

#3

Assigned to:Anonymous» 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.

#4

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

#5

Component:Code» Actions

#6

Status:active» closed (won't fix)

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

nobody click here