Comments

infojunkie’s picture

Status: Active » Needs review

@dema502, thanks for your patch!

I'd be grateful if someone could test this new action.

Katrina B’s picture

Tested it; the only menu offered as an option is the Development menu.

Katrina B’s picture

Fixed that problem:

Find
$options = menu_parent_options
in the inc file in function views_bulk_operations_menu_action_form($context)
Change menu_get_menus(false)
to menu_get_menus()

Testing again.

Katrina B’s picture

Yes, it works now.

infojunkie’s picture

Version: 6.x-1.10 » 6.x-1.x-dev

@Katrina B, thanks for the review and fix. Can you please package this as a patch against the latest version and format the code properly?

Katrina B’s picture

Well, I've never created a patch before, so I'm not sure where to begin. I'm mostly a designer; one of the other developers I work with is the one who figured out how to fix the problem.

infojunkie’s picture

OK, never mind. I will get it to when I have the time.

drifter’s picture

StatusFileSize
new2.42 KB

OK, here's a patch against 6.x-1.x-dev.

Several things fixed from the originally submitted code:

- you can now add nodes to the root of the menu, where plid is 0 (the menu name is now included)
- only the menu cache is cleared instead of all the caches, performance is now reasonable
- added an update hook to clear the actions variable

infojunkie’s picture

Thanks drifter will review this soon.

bojanz’s picture

Status: Needs review » Needs work

Did a quick glance, coding standard is all wrong (tabs...)

And do we really want to do this:

+function views_bulk_operations_update_6003() {
+  variable_del('views_bulk_operations_actions');
+  return array();
+}

every time we add a new action? Not really convinced.

infojunkie’s picture

@bojanz, yes, we do need to delete the actions variable, otherwise new operations would not be picked up. I know you didn't want to include this hack in the D7 branch, so do you have another suggestion?

bojanz’s picture

Sorry, you're right, I forgot that a cache clear won't kill it...

drifter’s picture

ok will run it through coder module, sorry about that...

drifter’s picture

Status: Needs work » Needs review
StatusFileSize
new2.75 KB

Here's a version with proper indentation and comments.

killerpoke’s picture

For a project I need your patch as a single module. I'v created a sandbox, containing almost your patch: http://drupal.org/sandbox/killerpoke/1651676
In the next days I will hopefully complete the work on this module.

Feel free to use this.

michaelfavia’s picture

StatusFileSize
new3.55 KB

Added for drupal 7.x-3 branch.

Patch applies cleanly and adds menu support with default menu selection on the vbo configuration settings in the view. This limits the possible values in the "action" form.

Graciously sponsored by soa.utexas.edu

michaelfavia’s picture

Version: 6.x-1.x-dev » 7.x-3.x-dev

Updating version. not sure if you want to apply to "head" and backport or the other way around. Please forgive bugspam.

anou’s picture

Thanks for the patch ! And works nicely. Do you think it could be possible to have the "remove from menu" option ;-) ?

anou’s picture

StatusFileSize
new2.88 KB

Here's a patch modified, adding the remove action. It adds a checkbox on the select menu item form, just under the "disable" checkbox. Checking it will remove all menu item of the parent menu from the nodes selected.

Cheers.

NB: It's for D7.x-3.x

markosef’s picture

I don't get this, patches are done on "menu.action.inc" but there is no menu.action.inc file in lateste versions of VBO? What to do?

markosef’s picture

I understood now what was the deal. Anyway #16 is not properly configured as you need to apply it in root of VBO and then copy menu.action.inc to actions folder manually, should be that you apply it from actions folder, but then path for "views_bulk_operations.module" part patch is not done as it can't be found.

anou’s picture

Just to say you have to apply #16 (then #19 if needed)

bojanz’s picture

Issue summary: View changes
Status: Needs review » Needs work

This needs to be a separate action ("Remove from menu").