Custom VBO action fails silently / works with AJAX error in Views Admin Here is an action I need to use with VBO:

/*
 * Implements hook_action_info()
 */
function ams_action_info() {
  $action = array(
    'ams_archive_action' =&gt; array(
      'type' =&gt; 'ams_survey',
      'label' =&gt; t('Archive survey'),
      'configurable' =&gt; FALSE,
      'triggers' =&gt; array('any'),
//      'behavior' =&gt; array('changes_property')
    )
  );
  return $action;
}



/*
 * Implements a registered drupal action to set the archive bit on given survey
 */
function ams_archive_action(&amp;$entity, $context = array()) {

  drupal_set_message(print_r($entity, TRUE));
  $entity-&gt;archive = 1;
  entity_save('ams_survey', $entity);
}


I selected the action in the list for a Bulk Operations field in a table view for my custom entities 'ams_survey'. The view and operations form look fine but executing the action just reloads the page. If I execute in the preview in view builder admin, I get an error popup starting with "An AJAX HTTP error occurred." but the action is successfully performed.

A block display for this view is being loaded and displayed inside a form callback which is being loaded in a page callback from hook_menu(). I have tried turning off AJAX and turning off views cache with the same result.
The malfunction was due to the VBO form appearing inside another form. I changed the page callback to be a regular function (not form builder) that loads the block view and actions are working.