I'm trying to map this element:

[enclosures] => Array
                (
                    [image] => Array
                        (
                            [jpeg] => Array
                                (
                                    [0] => Array
                                        (
                                            [bitrate] => 
                                            [...]
                                            [length] => 1887
 -->                                         [link] => http://img.stern.de/_content/65/06/650637/Travolta1_80.jpg

to this field:

options->enclosures->image->jpeg:
Map to field_remote_rss_link (link)

If I manually enter it, it works like a charm.
Mapping it from a RSS-feed just generates empty nodes. (No title, no body, nothing)

Can anyone help me to get this going?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jpp’s picture

I have a similar issue with options->enclosures->audio->mpeg field that I'l like to map to a link - I get the same result - empty nodes.

I'm also a little confused as to why all the subfields show up in the From Field Example section but don't show up as mappable items down the page.

The feed in question is here: http://feeds.feedburner.com/SexLoveAndIntimacy

jpp’s picture

Changed to a bug report -

I did major surgery on feedapi_mapper_link.inc - (borrowed heavily from the emvideo mapper) the bug causing blank nodes is the "return $node" line that needs to be outside the } below it. While I was messing with it I made it work with returned arrays like the ones found in media rss - it's working fine now for my mpeg attachments.

The file is so small I just attached it rather than a patch.

EDIT - use the file further down this one has a bug

Krummrey’s picture

Title: Mapping an Image within an enclosrue as a CCK-Link » Mapping an Image within an enclosure as a CCK-Link
Category: support » bug

The new mapper works! Great.

However, I get this error when enabeling your patch:

recoverable fatal error: Object of class stdClass could not be converted to string in /Applications/MAMP/htdocs/drupal-6-multi-acquia/sites/all/modules/feedapi_mapper/feedapi_mapper.module on line 81.

Do you have the same?

jpp’s picture

Got it - I needed to return FALSE for the description if it wasn't a link field type. This should work.

jpp’s picture

Status: Active » Needs review
alex_b’s picture

Status: Needs review » Needs work

Please submit patches in the right format - you make reviewing much easier that way - http://drupal.org/patch/create

Thank you.

jpp’s picture

Status: Needs work » Needs review
FileSize
2.51 KB

Here you go

Krummrey’s picture

Patch works for me.

alex_b’s picture

#7 @jpp: there is still a problem with the formatting of the patch :-)

Are you using tabs for indents? It should be spaces - 2 spaces per indent...

alex_b’s picture

Status: Needs review » Needs work
Krummrey’s picture

I grabbed the previous patch and detabbed it with 2 spaces.
Does it go through now?

szy’s picture

*cut*, sorry, wrong thread.

Szy.