Mapper for node title, body, etc

alex_b - December 1, 2008 - 23:19
Project:Feed Element Mapper
Version:6.x-2.0-alpha3
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Feed Element Mapper should be able to map to node title and node body just as to any other element.

#1

alex_b - December 1, 2008 - 23:21

Make sure 'mapping to 0' = hiding these fields is possible #323501: Hiding selected feed mappings?

#2

alex_b - December 1, 2008 - 23:21
Title:Support mapping to title and body elements» Support mapping to node title and body

More accurate title.

#3

alex_b - December 2, 2008 - 00:44
Status:active» needs review

That's my first shot at this. Mapping to title, created date and body working quite well. It's going to be harder to make this completely override default feedapi node processor mappings. With completely override I mean e. g. not storing any body if the description -> body mapping is removed.

AttachmentSize
341377_node_module_mapper.patch 1.25 KB

#4

alex_b - December 2, 2008 - 17:39
Title:Support mapping to node title and body» Full overridability of node title, body, etc mapping
Status:needs review» active

I committed this to HEAD.

What's missing is full overridability as described in #3.

Per default mapper should show mappings as executed by feedapi_node, if these mappings are removed, targets should stay empty.

I need to think better on how to build this but for now I am thinking there should be a 'default' $op in hook_feedapi_mapper() that allows a mapper to define a default mapping. This default mapping is used to execute mappings on feed items that don't have a mapper defined and it is used to populate the configuration form.

#5

steeroy - May 20, 2009 - 09:53

When you're mapping a feed element to body, looks like FeedAPI still maps the description to teaser.

This patch also maps the chosen feed element to the teaser if you're mapping to body.

AttachmentSize
feedapi_mapper_node.patch 153 bytes

#6

KoCo - May 26, 2009 - 10:33

+1 subscribe

#7

alex_b - May 27, 2009 - 23:44

#5 - this is actually OT, could you post a patch according to coding standards http://drupal.org/coding-standards on a separate issue? Thank you!

#8

robertdjung - June 1, 2009 - 17:56

subscribe

#9

iva2k - June 28, 2009 - 18:58

@alex_b:
Got a patch attached to a new issue #504642: Node teaser mapped from description - want to copy node body to teaser upon mapping . Please review there.

#10

giorgio79 - July 9, 2009 - 22:37

Hello,

I have title and body in my feed, yet, they do not get imported.

I have followed Sean's steps here, http://drupaltherapy.com/node/34, and I notice he did not need to map title and body feed fields, to his title and body node fields, and automagically it worked for him.

Still I checked, and even if I wanted to, on feed element mapper, the title and body fields do not show up in the dropdowns so I cannot tell the feed mapper to put my title and body from csv into the title and body of the node.

Can someone give me some light?

When I try to do the import all my nodes were imported with "No Title"

Even in the preview it shows "No Title"

All feed items of this feed merged into one. Here you can see which feed item elements are available for mapping. As this view is derived from the actual feed items on this feed, there might be more mappable elements than those listed here.

Array
(
    [title] => No title
    [description] =>
    [options] => Array
        (
            [timestamp] => 1247178149
            [guid] => b18ac06ea7acbf7b13242b0b1879fd75
            [raw] => Array
                (
                    [Title] => Whatever
                    [Tags] => Tags,Are,Detected,Here
                    [Taxonomy] => Computing & Internet
                    [Body] => Upgrades
                    ...some more cck fields
                )

        )

)

#11

giorgio79 - July 10, 2009 - 11:39
Version:6.x-1.x-dev» 6.x-1.0-beta9

Hmm, Alex I also checked your patch, but apparently there is no feedapi_mapper_node in my mappers folder in the latest version of the module? Has it been dropped?
I notice it exists in previous versions.

#12

giorgio79 - July 11, 2009 - 06:29

Sorry, it seems my feedapi mapper was not updated properly, so the node mapping file exists, yet the title and body was not imported.
I will try with mapping the title raw and body raw instead of the plain title and body now.

#13

giorgio79 - July 12, 2009 - 14:21
Status:active» reviewed & tested by the community

Ok, I got it to work finally by using the Title (raw) and body (raw) mappings, because those were coming straight from the csv file.

Thanks for this.

#14

giorgio79 - July 12, 2009 - 14:22
Status:reviewed & tested by the community» fixed

I guess I can set it straight to fixed :P

#15

alex_b - July 13, 2009 - 20:35
Title:Full overridability of node title, body, etc mapping» Mapper for node title, body, etc

giorgio79: I think you misunderstood the issue. But I must say that the focus of this issue has shifted in #4 which is not ideal anyway.

I'd like to leave this closed then. I'll rename this issue to its original title and open a separate one for full overridability:

#518180: Full overridability of node title, body, etc mapping

#16

System Message - July 27, 2009 - 20:40
Status:fixed» closed

Automatically closed -- issue fixed for 2 weeks with no activity.

#17

emilyf - October 13, 2009 - 18:12
Version:6.x-1.0-beta9» 6.x-2.0-alpha3
Status:closed» active

I'm sorry to reopen this issue, but I'm trying to figure out what other issue I should be following. I want to be able to map the feed description field to a custom field in my content type that is NOT the generic body field.

I am using the 2.x alpha release.

I looked here http://drupal.org/node/518180 which references 2 other issues but neither of those issues is explicit in saying it will do this.

#18

emilyf - October 13, 2009 - 18:21
Status:active» closed

Agggg. Sorry, I understand now. For anyone else trying to figure this out, this feature is indeed rolled into the 2.x version. You just need to delete the pre-mapped description element for it to show up in the mapping drop down.

 
 

Drupal is a registered trademark of Dries Buytaert.