Closed (cannot reproduce)
Project:
Migrate
Version:
6.x-2.2
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
31 May 2011 at 17:29 UTC
Updated:
8 Aug 2012 at 13:56 UTC
Hi,
how do I set the body_format to filtered_html?
I tried
$this->addFieldMapping('body_format')
->defaultValue('filtered_html');
Comments
Comment #1
mikeryanThe format is not a node field, it is an attribute of the body field and is passed to the body field through arguments. Try
If that works for you, please mark this issue as fixed.
Comment #2
jospBln commentedThanks,
that's it!
$this->addFieldMapping('body', 'HereComesYourSourceData')
->arguments(array('format' => 'filtered_html'));
Comment #4
chrisjlock commentedYou can also set the default format for the import with:
Comment #5
solomonson commentedThis feature did not work in 6.x-2.2. Is it only in the 7x version? When I try it, I get the following error during the import:
Comment #6
mikeryanIt should work - which technique were you using? text_format option on MigrateDestinationNode(), or format argument on the addFieldMapping()? Can you show your MigrateDestinationNode() and your addFieldMapping for the text field?
Comment #7
mikeryanNo further info provided.
Comment #8
alex andrascu commentedCan confirm this
and drush complains:
Comment #9
alex andrascu commentedguess it's a duplicate of #1686658: Setting input format filter on body field in Drupal 6 causes strpos() error