Closed (fixed)
Project:
Domain
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
13 Nov 2009 at 18:42 UTC
Updated:
27 Feb 2010 at 20:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
agentrickardNice!
Has anyone else tested it?
Comment #2
bleen commentedno one I know of ... "needs review" :)
Comment #3
agentrickardWhy is domain_site always FALSE? Should we send some content to all affiliates for testing?
And should we assign content to inactive domains?
It would also be awesome if the user could choose how they want the generation to work:
a) Random, sites only
b) Random, sites and all affilaites
c) Chosen, via a form
Comment #4
bleen commentedTo be honest, I am really new to "Domain Access." I would need a bunch of guidence to get some of your suggestions working. Like, for instance ... what is the "domain_site"?
To get this patch working I simply peered into a node and reproduced its values. If you want to point me in the right direction Ill happily give it a shot...
Conceptually, I suppose we could simply add another fieldgroup to the settings tab if the generate module is installed...
Thoughts?
Comment #5
agentrickarddomain_site is the 'send to all affiliates grant, which you have hardcoded to FALSE. It might be as simple as a random boolean generator there.
I was thinking of using hook_form_alter() on the generate form itself, to pass values to your presave hook.
Comment #6
bleen commentedeven better ... giving this a whirl. I may have a few questions as I go
Comment #7
bleen commentedOk .. this patch gives users a few more options in the devel generate form that are domain access specific.
Procedure to test:
Things to definitely pay attention to:
Todo (assuming this all works well):
Comment #8
bleen commentedbump
Comment #9
bleen commentedThis couldn't make it in v2.1?
Comment #10
agentrickardObviously not. 6.x is really in bugfix only mode.
Anyone else care to review this patch?
Comment #11
nonsieHere's a bit improved patch. It will come quite handy while trying to solve #534170: Integrate with Domain Access
Comment #12
bleen commented@nonsie, looks great... only thing I dont understand is this:
+ $form['#submit'][] = 'domain_devel_generate_submit';Why is this needed?
Comment #13
nonsieYour patch had a custom submit handler - this is not needed in this case.
Comment #14
bleen commentedahahah ... I was looking at my own patch when I asked that question. DOH!
Anyway, the patch in #11 works great ...
Comment #15
agentrickardThat patch was broken and failed to assign content to the default domain in my tests.
The attached seems to work, and cleans things up quite a bit. It also uses the new 'select list or checkbox' form element and move the form alter into its own, named hook.
Comment #16
dave reidFeels like this should probably live in a domain_generate sub-module.
Comment #17
agentrickardCommitted.