0

I'm trying to map data in a migration to a View Reference field (here called field_sci_view_to_use) in my Content Type.

I have assigned the View ID a default value in the field configuration as that will be a constant per Content Type.

However, when attempting to map the argument value string, it is never picked up.

I attempted using the following code:

$this->addFieldMapping('field_sci_view_to_use:arguments', 'pdbid')
     ->description(t('The default value to use as contextual filter for the view'));

I have examined the internals of the View Reference module and found that arguments contains two sub elements - php_arguments and dsv_arguments. Is it possible to chain these together so that the addFieldMapping 1st argument is "field_sci_view_to_use:arguments:dsv_arguments"? If not, what is the correct syntax here?

  • 1
    Module's that provide fancy fields do not automatically work with the migrate module. The module that provides the field has to add migrate support. For example see the migrate include file in a module like name, address field, or location. Without this migrate doesn't know what to do with the php_arguments or dsv_arguments fields. You will need to create an issue for the module to add migrate support. – rooby Jan 27 '14 at 14:49
  • Fair enough. I've raised a ticket with them at drupal.org/node/2182717 in case anyone else is having this problem. – Paul Barrett Jan 27 '14 at 15:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.