Needs work
Project:
Views Bulk Operations (VBO)
Version:
7.x-3.x-dev
Component:
Actions
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Oct 2010 at 13:49 UTC
Updated:
12 Nov 2013 at 19:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
infojunkie@dema502, thanks for your patch!
I'd be grateful if someone could test this new action.
Comment #2
Katrina B commentedTested it; the only menu offered as an option is the Development menu.
Comment #3
Katrina B commentedFixed 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.
Comment #4
Katrina B commentedYes, it works now.
Comment #5
infojunkie@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?
Comment #6
Katrina B commentedWell, 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.
Comment #7
infojunkieOK, never mind. I will get it to when I have the time.
Comment #8
drifter commentedOK, 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
Comment #9
infojunkieThanks drifter will review this soon.
Comment #10
bojanz commentedDid a quick glance, coding standard is all wrong (tabs...)
And do we really want to do this:
every time we add a new action? Not really convinced.
Comment #11
infojunkie@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?
Comment #12
bojanz commentedSorry, you're right, I forgot that a cache clear won't kill it...
Comment #13
drifter commentedok will run it through coder module, sorry about that...
Comment #14
drifter commentedHere's a version with proper indentation and comments.
Comment #15
killerpoke commentedFor 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.
Comment #16
michaelfavia commentedAdded 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
Comment #17
michaelfavia commentedUpdating version. not sure if you want to apply to "head" and backport or the other way around. Please forgive bugspam.
Comment #18
anouThanks for the patch ! And works nicely. Do you think it could be possible to have the "remove from menu" option ;-) ?
Comment #19
anouHere'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
Comment #20
markosef commentedI 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?
Comment #21
markosef commentedI 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.
Comment #22
anouJust to say you have to apply #16 (then #19 if needed)
Comment #23
bojanz commentedThis needs to be a separate action ("Remove from menu").