Hello guys.

I have some problems because I was importing some RSS nodes using the description in RSS to set the Node body, the problem I have is the body always has the filtered_html format, and I need set the full_html format.

I tried changing the order or text format and disabling and enabling filters, but always got the same results, also I tried with better_formats module.

Is important to maintain the Drupal settings for the body text format, using the author id configured in processor settings.

Regards,

enzo

Comments

-enzo-’s picture

Status: Active » Needs review
StatusFileSize
new699 bytes

Hello Guys

I just did a mini patch to use author preferences of text format to assign the default format to new node created via feeds importation process.

Please check and evaluate include in new version

rmontero’s picture

Status: Needs review » Needs work
+++ b/plugins/FeedsNodeProcessor.incundefined
@@ -85,6 +85,15 @@ class FeedsNodeProcessor extends FeedsProcessor {
+    $user = new stdClass();
+    $user->uid = $this->config['author'];
+
+    $formats = filter_formats($user);
+    if(!empty($formats)){
+	$default_format  = array_shift($formats);
+    	$entity->body[$entity->language][0]['format']  = $default_format->format;
+    }

I would change that to:

  $account = new stdClass();
  $account->uid = $this->config['author'];

  $entity->body[$entity->language][0]['format']  = filter_default_format($account);

Although I haven't tested it yet.

-enzo-’s picture

Hey guys this is a new version of patch simplified after followed some recommendation from Roberto Montero (http://drupal.org/user/191552)

twistor’s picture

Status: Needs work » Postponed (maintainer needs more info)

I don't understand, you can set the filter format in the processor settings.

denisvs’s picture

-enzo-
Cool job!

twistor
Settings of Text format not assign in dev version, it's bug.

twistor’s picture

Priority: Major » Normal

There are two different issues going on here. One is that the correct filter format is not being applied according to the settings in the Node processor. The other, is using the user's settings for the filter format.

They need to be split up.

philipz’s picture

StatusFileSize
new48.37 KB

Lets keep this focused on the problem that correct filter format is not being applied according to the settings in the Node processor.

I'm debugging this right now and first thing I'm seeing is this strange data array before saving entity. The body value and format are in separate array items as if these where two body fields: the first one only with the value and the second one only with the format.

philipz’s picture

StatusFileSize
new425 bytes

I think I found the problem and first tests are showing that it's working.

slefevre1’s picture

From the fix in your patch, this issue seems to be a duplicate of http://drupal.org/node/1807920 ?

twistor’s picture

twistor’s picture

Category: feature » bug
Status: Postponed (maintainer needs more info) » Closed (duplicate)
twistor’s picture

Issue summary: View changes

Fixed grammer errors