Closed (fixed)
Project:
Views Bulk Operations (VBO)
Version:
6.x-1.x-dev
Component:
Core
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2011 at 05:24 UTC
Updated:
27 Dec 2011 at 22:50 UTC
Not sure if this is a Views or VBO issue.
1) Create a new view of type User
2) Set it up for VBO, any action will do
3) Add a field "username", make sure to UN-CHECK "Link to user"
Now, try to perform an action on the view. It seems to fail because "uid" is not in the resultset, and the loader from hook_vbo_object_info does not return anything.
If you check "link to user" and try it again, it works, because in order to grab the UID, it is added to the result set.
I have a feeling this is views, but wanted to post it here first.
Tested with Views 6.x-3.x and VBO 6.x-1.x
Comments
Comment #1
bojanz commentedYeah, Views 3 changed the logic around adding the base field, so now VBO needs to do that explicitly (currently it doesn't, hence your problem).
Comment #2
djdevinThanks for clarifying that, we had a bunch of views coming from 6.x-2.x that broke. Is this something VBO is going to take care of or should we assume that the base field has to be added by some other means?
Comment #3
bojanz commentedThis is something that should be fixed in VBO.
Comment #4
djdevinIs that a request for a patch :) We have a lot of views we'd rather not change, and we have some time to work on it.
Comment #5
bojanz commentedI'm always happy to accept contributions :)
I'm guessing you need to add a query() method to views_bulk_operations_plugin_style.inc.
Here's the appropriate code in the row plugin (which doesn't get called since we don't use the row plugin. I wonder if just enabling that in views_bulk_operations_views_plugins() might do the trick):
And please confirm that the solution works with both Views 2 and Views 3.
I'll paste this issue to dereine on IRC when he comes online, he might have more tips, I haven't done the Views 2 -> Views 3 switch in a long time..
Thanks!
Comment #6
djdevinGreat, I was thinking the same thing. Will do some testing.
Comment #7
djdevinThis worked for us, stripped down to:
Not sure if there's any implications...checks if the base field is not present in the view, then add it. Need to do some exploratory testing in Views 2/3.
Edit: tested it against Views 2, and it seems to not do anything since the base field is already present.
Comment #8
infojunkieI reproduced the original problem and verified that #7 did solve it. Committed to latest dev. Thanks!