Porting a drupal 6 site here.

I have a simple action, defined as such:

array(
    'presswire_removefromlist_action' => array(
      'type' => 'node',
      'label' => t('Remove from list'),
      'triggers' => array('any'),
      'configurable' => FALSE,
    ),

It appears in the core actions list under configuration->actions but I cannot get it to appear as an option for my VBO field. What am I missing here?

CommentFileSizeAuthor
#7 presswire.module.tar_.gz600 bytesskitten

Comments

bojanz’s picture

Alpha2 had broken actions, -dev fixed this. But you say you're already using -dev...
You can try placing a few dsm()s into populate_operations() of views_bulk_operations_handler_field_operations.inc and see if it's getting the action at all.
You can also attach the whole module that's providing the action here, and I can try to reproduce.

bojanz’s picture

Possibly related:#1188244: Flag integration not working - flags don't show up in VBO settings

EDIT: No, that was unrelated.
Doing a dsm($action_operations) below: $action_operations = actions_list(); in views_bulk_operations_field_operations.inc would be best.

skitten’s picture

Hmm, my action is there in $form['vbo']['selected_operations'] when options_form() returns, but still isn't making it into the UI. Where else might it be getting filtered out?

bojanz’s picture

Permissions.
In views_bulk_operations_handler_field_operations::get_selected_operations().

Are you using the actions_permissions module? That might affect it.
Of course, permissions don't matter if you're editing the view as admin (admin can always see everything).

skitten’s picture

I thought about that - but even as admin I don't see it.

bojanz’s picture

Can you strip your code to the bare minimum and share it here (or privately)?
I haven't had a problem with any action I tried (that I didn't fix before alpha3), so I'm not sure where else to send you checking..

skitten’s picture

StatusFileSize
new600 bytes

Sure - this was the very start of developing this module so there's nothing in there but the action.

bojanz’s picture

Status: Active » Fixed

This was... unexpected.
The checkbox for your action was in the list all along, but it was hidden (display:none) by a misbehaving Views CSS rule, because it has "remove" in it's name.
Replace the "remove" part of the action name, and monitor the issue I opened in Views #1193742: CSS rule with unintended consequences.

skitten’s picture

Interesting—it would have taken me forever to figure that one out. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

nagiek’s picture

Title: Simple action not available in VBO » Actions with "remove" in name not available in VBO

Wow I am glad I found this post!! I had the same problem.

Retitling for better visibility, although people should check out the separate issue.