How to prevent data loss from custom field when using Views Bulk Operations? I have developed a custom field type, widget etc all in its own module.

We also use Administration Views module with Views Bulk Operations.

Our content guys used the VBO action Publish from the Content Overview (Views) screen to mass publish few nodes which have this custom field. This caused data loss from all the nodes, but only the data from my custom field.

What causes this and how to prevent it?
The action does this:

  $node-&gt;status = NODE_PUBLISHED;
  entity_save('node', $node);


So the fail is not coming from VBO, you have a bug in your field code. Hard to tell where without looking at it.