I'm trying to use VBO to 'Change affiliate publishing options' which comes with Domain Access. When I select any node and click 'Execute' I get a WSOD on the next page. I get a PHP error of 'PHP Fatal error: Unsupported operand types in blah/modules/views_bulk_operations.module on line 346.
I've tried it using the latest dev version also (dated May 6th) and it just changes the line the error is on.
I'm using Views version 2.10 though I noticed that it is actually '6.x-2.10-acquiadev-1' which must be a special update that the Acquia distribution uses. I'm not sure if that could make a difference or not.
The action does work correctly when I use it directly through the Domain Access system.
Any ideas? Thanks!
| Comment | File | Size | Author |
|---|---|---|---|
| #42 | domain-vbo-804926-42.patch | 7.15 KB | artem.vilkov |
Comments
Comment #1
infojunkieDoes the same VBO work with any other operation? Does the stock VBO (admin/content/node2) work at all?
Comment #2
FunkMonkey commentedWell, I can't even recreate my own error right now. I'm not sure if something happened since Friday but I will close this and will re-open if I can consistently recreate the problem. Sorry to waste your time!
Comment #3
hnln commentedSame problem here and unfortunately it didn't resolve itself. Other operations don't give any problem, only the Domain Access operation gives above error.
Comment #4
hnln commentedComment #5
mikeytown2 commentedMoving this to the domain access project
Comment #6
mikeytown2 commentedlooking around; found this
#710712: How to change content affiliation for 1000+ nodes
Which points to this module if you want to use this action in VBO
http://drupal.org/project/domain_actions
Comment #7
agentrickardDA 6.x does not support VBO. VBO doesn't use hook_node_operations the same way that core does. Domain Content is provided instead (and that module actually predates VBO).
Comment #8
agentrickardComment #9
mikeytown2 commentedMain issue here is the fact that there is an action, thus most people will try to use that action in VBO; like I did yesterday. Not sure how you want to go forward, just letting you know that you will get some support requests for this in the future if left in its current state.
Comment #10
agentrickardWe did, and we tried to resolve it in #710712: How to change content affiliation for 1000+ nodes and dropped it there. Feel free to re-open that patch for D6.
Personally, I think this is a bug in VBO, since it uses hook_node_operations() but does _not_ do it the way that core does.
Comment #11
infojunkie@agentrickard, if you could explain what is the bug in VBO that prevents the DA node_operation from functioning correctly, maybe I could fix it.
Comment #12
agentrickardThe VBO submit operation is a multistep process, as I recall, and core's is not. That means that the form_alter() we use to add our settings to core don't work for VBO.
See the other issue for the long history.
Comment #13
agentrickardIn Drupal 7, we can solve this with VBO's support for actions. Anyone care to code it?
Comment #14
fuse commentedsubscribing
Comment #15
agentrickard@fuse
Please use the "Follow" button to avoid spamming maintainers.
Comment #16
fearlsgroove commentedAttached patch implements the required action to use with VBO. It includes some refactoring to allow re-use of the process node code, so the patch looks bigger than it really is.
Comment #17
fearlsgroove commentedPrevious patch was missing domain_source integration.
Comment #18
fearlsgroove commentedDomain source functions aren't firing since they're hooked into #validate and submit, which aren't in the same spot for the VBO form. Handling these with submit isn't going to work here because we want to use VBO's batch processing.
I see two possible workarounds:
* If relevant, call out into domain_source from the action in domain_content. This creates a loose circular dependency -- source integrates with content, but now content would optionally integrate with source. Fugly
* Refactor into a hook, which would expand the scope of this a bit. Seems a bit heavy handed
Comment #19
fearlsgroove commentedThis attempt skirts around the circular dep/implement hook question by making source and content two separate options. Much simpler to build but maybe not ideal from a UX perspective.
Comment #20
agentrickardNot sure if there is anything to be done about that in VBO, though.
Comment #21
vlooivlerke commentedWith the latest Dev of VBO there is an option in the view style of VBO under
>>Selected operations
>>>Change affiliate publishing options (domain_content_node_operations_process)
If I select a few nodes to execute and then select " Change affiliate publishing options" to execute in my view bulk operations it takes me to the following page and asks
>>Set parameters for Change affiliate publishing options
This page is empty and don't have any domain parameter options to select.
It only has a next button.
I ask this because your patch does not match over the new VBO dev version.
I seriously want to use views to update my domain publishing
If I would (and tried) to patch your patch what would I have to look out for to be able to use your approach?
Thanks
Edit+ I used D6
Comment #22
mxh commented#19 - for which version is this patch actually? I am looking for a long time for Actions integration, but have no luck. ON Domain Actions module project page I cannot find any module to download.
Comment #23
agentrickardFlagging for re-roll against 7.x.3.
Comment #24
les lim#19 still applies with offsets.
Comment #25
jawi commentedCan I use this with latest domain 7.x-3.x-dev version from 2013-Jan-28?
Comment #26
podarokstatus
Comment #27
mac_weber commentedpatch on #19 still works
Comment #28
agentrickardLooking at this after a long time away, I don't know that it is proper to put this integration into Domain Content. That module both predates VBO and works around its limitations.
VBO integration for changing domains should likely be supported directly in the main module.
Comment #29
agentrickardComment #30
fearlsgroove commentedThe logic for assignment is all in domain content. Would the plan be to deprecate domain content completely? Otherwise it's quite a bit of surgery and/or code duplication, and a considerable expansion of a fairly narrow change.
Domain content exists to provide batch management for content domain assignment, so this stuff makes sense to me here unless you plan to deprecate domain content completely ( I think? It's been a while since I looked at it).
Comment #31
agentrickardDomain Content predates VBO, which is why we have the code duplication. It also removes any dependency on Views.
IMO, if people want to build an alternative using Views and VBO, they should not be using Domain Content.
Comment #32
davidwhthomas commentedNot sure if relevant but domain_rules provides rules which are available for VBO, they just need to be added as an action to a rules "component".
e.g, exported rule component to set user domain ( www.example.com )
Comment #33
petednz commenteddave - thanks for sharing that - saved me a bunch of time or a work around or just giving up
given this is to help us assign users to domains - is it more than a trivial fix to have a parameter (?) instead of the hard coded domain url - so available domains are offered via the VBO UI?
Comment #34
fearlsgroove commentedHere's a reroll, still putting the update logic in domain_content. @agentrickard: Would you prefer that the affiliate form assignment code be moved into domain.module (along with the VBO specific stuff)?
Comment #35
fearlsgroove commentedOops ... patch
Comment #36
theroyal commentedI need to bulk update of domain source field for about 70,000 nodes,
will this patch help ?
am using latest version of DA and VBO and domain VBO
Comment #37
fearlsgroove commentedI wouldn't try to do anything on 70k nodes using the browser/batch API. A drush script is probably a better idea if that's possible. That said, theoretically, yes, you could apply this patch, create a view with bulk operations filtered to the nodes you want to change, add the change domain source option and go to town. Test on a local/dev site first.
Comment #38
jweirather commentedI left a note on another thread about this. Look at the Domain Migrate module. https://www.drupal.org/project/domain_migrate
Comment #39
bbcThanks fearlsgroove. The patch in #35 worked quite nicely for me.
Comment #40
podarokJust a small addition.
It is better to use db_merge, I guess
Anyway - it is ok to merge.
Comment #41
dasjothe latest patch contains a dpm statement
Comment #42
artem.vilkov commentedComment #43
mgiffordNo dpm() in #42
Comment #44
bluegeek9 commentedDrupal 7 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.