Closed (fixed)
Project:
Domain
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
14 Jun 2011 at 22:31 UTC
Updated:
17 Oct 2011 at 20:51 UTC
Jump to comment: Most recent file
Comments
Comment #1
agentrickardNormally, you should use hook_domain_insert() instead, but I see the point here.
You're testing domain_dir 7.x-1.x, right?
Comment #2
ejustice commentedYes I'm working off domain_dir 7.x-1.x.
The issue at the moment is the way you started domain_dir has it calling domain_dir_form_domain_form_alter(). So the dir creation is being processed as part of the domain form submission and therefore domain_dir isn't the one creating a new domain. Unless I'm misunderstanding the purpose of hook_domain_insert().
Comment #3
agentrickardRight. hook_domain_insert() expects module to act on the $domain after form processing. But here, we need the domain_id because we are adding data to the form.
The "other" way to do this is to run a domain lookup on the subdomain, which should return data (if $reset is TRUE), but this patch is likely better.
Comment #4
agentrickardSince form_set_value() is expressly for validate functions, we can do this a little easier.
Committed to 7.x.3.
Comment #5
agentrickardThis doesn't really apply cleanly to 7.x.2 or 6.x.2 without doing handstands for domain 0, so not committing there.