Unless I've completely missed it (which is very possible), it is only possible to select one text format filter for the node processor. This filter then applies to all text imported into all of the text fields in the nodes that Feeds creates. Unfortunately, this prevents importing text into multiple fields with different requirements. For example, having the body field get full html while another text field only getting filtered html. Could options be added to the mapping settings for the node processor to allow selection of the filter to be used on text fields on a case-by-case basis?

A simple example use case is importing a blog's RSS feed where a "summary" text field gets filtered html in order to strip out any images or other unnecessary formatting while a "body" field imports full html. That way teasers wouldn't get filled with images or nothing at all if html code is too long.

Comments

twistor’s picture

Component: Feeds Import » Code
Assigned: Unassigned » twistor
Status: Active » Needs review
StatusFileSize
new6.72 KB

Here's an initial crack at this. It could use some testing.

twistor’s picture

Version: 7.x-2.0-alpha4 » 7.x-2.x-dev
Issue tags: +Needs tests
slcp’s picture

Status: Needs review » Needs work

Tested this patch and get the following at the import form.

Notice: Undefined index: unique in FeedsCSVParser->sourceForm() (line 126 of /home/honey/www/gestaltuk-dev/htdocs/sites/all/modules/contrib/feeds/plugins/FeedsCSVParser.inc).

I only receive this error on the one importer that I have attempted to assign filters to fields for. My other importers that I have not touched after applying the patch show no such errors.

slcp’s picture

Follow up to #3, this is the diff between the importer exported before and after choosing an input filter for a field - 'unique' is lost when 'format' is gained.

'target' => 'field_article_bibliography',
- 'unique' => FALSE,
+ 'format' => 'wysiwyg',
franz’s picture

When it goes in, need to tweak #962912: Mapping to node summary.

twistor’s picture

Assigned: twistor » Unassigned
Issue summary: View changes
Status: Needs work » Closed (duplicate)
Issue tags: -Needs tests