When I use 'Save post' to bulk save my nodes, existing taxonomy terms are removed from them. I believe the problem to be an incompatibility between a custom module I've written (attached below) and this module.
The problem doesn't happen when I save nodes manually (i.e. without using VBO), nor does it happen with VBO when my module is disabled. The problem only happens when using both VBO and my module.

When I select nodes to update and click 'Save post', the operation runs successfully, but displays the following error: warning: Illegal offset type in /home/brat/public_html/drupal/sites/all/modules/brat/brat.module on line 52.
Again, this error doesn't appear when I save nodes manually.

Just wondering if you're able to help me fix this issue so I can bulk save all my nodes so my module will work properly.
NOTE: I posted a separate issue relating to this before realising it was a VBO issue: http://drupal.org/node/368208

One thing I just noticed that may be of interest is that I just added dsm($node->taxonomy); to my module, which returns an array of 3 objects (the 3 taxonomy terms (existing one and my module's two)) when saving with the VBO module, and an array of 1 element (just the existing term) when saving normally... Not sure what this means but it may be helpful to someone.

CommentFileSizeAuthor
brat.module.txt4.32 KBAnonymous (not verified)

Comments

infojunkie’s picture

Can you please explain what's the use of just calling "Save post" in VBO? AFAIU, this will just save an existing node without making any change to it. Have these nodes been modified prior to using VBO? In that case, maybe you could consider wrapping your functionality in your own action.

Anonymous’s picture

My module implements hook_nodeapi() with the operation 'presave' (i.e. it runs when a node is about to be saved).
I wouldn't need to use VBO except that I have about 70 nodes already in existence that need to be updated with my module's changes. I therefore have to go and re-save each one so my module can run and they can be updated, hence the need for VBO (save editing 70 nodes manually).

Anonymous’s picture

Component: Code » Core
Status: Active » Closed (fixed)

No longer experiencing issue.