Needs review
Project:
Domain Rules
Version:
6.x-1.3
Component:
User interface
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
25 Aug 2010 at 19:35 UTC
Updated:
22 Aug 2012 at 13:12 UTC
Jump to comment: Most recent file
hello, i want tu use this in my rules, but in wich type i must provide domain for a node? i mean what in rules i have only text field row for input domain, if i input http://mydomain.com or token for it i have a error on this rule
The domain http://mydomain.com/ does not exist.here is code of this function
function rules_action_set_node_domain($node, $settings) {
$domain = domain_lookup(NULL, $settings['subdomain'], TRUE);
if ($domain['domain_id']) {
$node->domains[$domain['domain_id']] = $domain['domain_id'];
}
else {
drupal_set_message(t('The domain @domain does not exist.', array('@domain' => $settings['subdomain'])), 'error');
}
return array('node' => $node);
}
i think what this is not work, because i want to set domain with id 0 for this node and this domain is not a subdomain
i can't write in php so well, any help for fix this issue ?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | default_domain_fix-893450-5.patch | 552 bytes | aron novak |
Comments
Comment #1
shushu commentedThanks for the details.
True, seems like a bug.
I will fix it in the near future, but you can try to fix it by chaning the line
to:
Please let me know whether it solved the problem.
Regards,
Shushu
Comment #2
ionmedia commentedok, now i have
after this action execution i have no errors, but it still not work for a source domain
if i use prefix.domain.com in this action all works fine and node published to this domain
if just use domain.com no errors or warnings appear, but node don't published on the domain.com
Comment #3
aron novakThis would work. I'm happy to provide a patch if there is any feedback.
Comment #4
shushu commentedPlease send a patch, I will insert it and release a version :-)
Comment #5
aron novakHere it is.
Comment #6
shushu commentedThanks Aron, and sorry for the delay.
Comment #7
shushu commentedComment #8
reswild commentedThe last patch for version 6.x seems to be missing the line
$domain_id = $domain['domain_id'];so $domain_id is never defined, and the default domain is always assigned no matter what you put in your rules.
The patch for 7.x seems to be OK.
Comment #9
shushu commented