This is a bug involving integration with the core actions module and the Views Bulk Operations module.

Steps to reproduce:

0. Have a few taxonomy terms to work with.
1. Enable VBO, actions, flag module and actions integration for flag module.
2. Add a flag for nodes at /admin/build/flags/add.
3. Add an action for that flag, select "Modify node taxonomy terms."
4. Leave the default selection of "Add the selected terms" and choose one or more existing terms, submit the page.
5. Edit the action. The terms will have reverted black to blank/None/None Selected in each vocabulary, regardless of previous selection.

Using: Drupal 6.16, Views 2.8, VBO 1.9, Flag 1.2

At first I thought this was an issue with VBO, but infojunkie established that it's not in the related issue #674864: "Modify node taxonomy terms" changes are not taking effect:

In flag_actions.module, the code in flag_actions_form_submit() does:

$parameters = $form_state['values'];
unset($parameters['flag']);

while the correct handling for actions parameters should be:

$parameters = call_user_func($callback . '_submit', $form, $form_state);

(The relevant code is on lines 463-464 in flag_actions.module.)

I've tried the suggested code replacement and it does work. But since this is an initial post I won't mark it as "needs review" just yet.

Comments

quicksketch’s picture

Thanks, a patch would be appreciate for this issue, especially since it will need to be tested an applied against multiple branches.

rootwork’s picture

StatusFileSize
new620 bytes

Here you are!

archetwist’s picture

Status: Active » Reviewed & tested by the community

I can confirm the patch works as intended.

robby.smith’s picture

subscribing - will this go into 6.x-2.x-dev as well?

quicksketch’s picture

Status: Reviewed & tested by the community » Needs work

Hmm, this patch doesn't look correct. It doesn't seem right at all that a submit handler should manually be calling arbitrary additional submit handlers. Could some one explain why this is the correct approach or reference other forms that use this odd mechanism?

quicksketch’s picture

Status: Needs work » Fixed
StatusFileSize
new1.55 KB

Wow, okay I forgot how sorta-hacky actions integration is. This patch was mostly correct, except it may cause issues on actions that don't specifically include a submit handler. Flag actions also has a problem similar to this one in that it doesn't execute validate handlers either. I've committed this patch which incorporates your changes in addition to adding validation handlers.

rootwork’s picture

Hooray! And thanks for working through the hackiness :)

Status: Fixed » Closed (fixed)

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