Needed support for Domain Access. So here it is. Worked for me.

Regards

CommentFileSizeAuthor
#2 domain.zip978 bytesDocc
domain.zip112 bytesDocc

Comments

Robrecht Jacques’s picture

Is it just me, or is this zip file empty?

Docc’s picture

StatusFileSize
new978 bytes

auch, funny... Here`s a correct one.

Robrecht Jacques’s picture

Great!

One comment (not having used domain module myself):

    '#default_value' => array(($_domain['domain_id'] == 0) ? -1 : $_domain['domain_id']), // Can't use 0 as a checkbox value.

probably must be 'default_value'.

Docc’s picture

yes it does :)

Robrecht Jacques’s picture

Status: Needs review » Fixed

Added to CVS. Will be included in -rc5. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

gateone’s picture

Noticed something that might help in general:

When using Node Import together with the Domain Access module, I have noticed that you get a validation error for the domain source when you try to import into a node type that defaults to a certain domain and you do the import from another Domain Access handled domain. That is, domain source seems to not apply correctly if the domain you access node import from is different than the final source domain for that node.

Sorry, this sounds a bit complicated. But here is what works:

Try do node import exactly from that domain that is going to be also set as source domain for the imported nodes, then all works like a charm.

Not sure if this is a bug so I am not opening up this issue again. It might be "broken" by design maybe...

estum’s picture


/**
 * Implementation of hook_node_import_values_alter().
 */
function domain_node_import_values_alter(&$values, $type, $defaults, $options, $fields, $preview) {
  if (node_import_type_is_node($type) !== FALSE) {
    if (isset($values['domains']) && !empty($values['domains'])) {
      $domains_values = array();
      foreach($values['domains'] as $key => $value) {
       $domains_values[$key] = $key;
      }
      $values['domains'] = $domains_values;
    }
  }
}