Download & Extend

Mapping an Image within an enclosure as a CCK-Link

Project:Feed Element Mapper
Version:6.x-1.x-dev
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs work

Issue Summary

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?

Comments

#1

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

#2

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

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

AttachmentSize
feedapi_mapper_link.inc_.zip 1.11 KB

#3

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?

#4

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

AttachmentSize
feedapi_mapper_link.inc_.zip 1.13 KB

#5

Status:active» needs review

#6

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.

#7

Status:needs work» needs review

Here you go

AttachmentSize
feedapi_mapper_link.inc_.patch 2.51 KB

#8

Patch works for me.

#9

#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...

#10

Status:needs review» needs work

#11

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

AttachmentSize
feedapi_mapper_link.inc_.patch 2.53 KB

#12

*cut*, sorry, wrong thread.

Szy.