I want each of my feed items to have a CCK Text field attached to them, with its data supplied by a default value generated by PHP. I've set up the feed item content type so that this works -- the PHP code generates the default value for my CCK field properly when I use the Create Content link for the feed item type. But items of this type that are created by Feed API do not receive the default value. They work fine otherwise -- bringing in the content and date and everything -- but the CCK field is blank. I am using Feed Element Mapper, but not mapping anything to that CCK field.

Any suggestions or fixes?
Thanks.

Comments

Steve Dondley’s picture

I'm looking for a solution to this, too. I have a cck text field (select type) that I'd like have set to its default value when the node is created by feedapi.

Steve Dondley’s picture

This discussion seems relevant. Probably a cck issue: http://drupal.org/node/200359

alex_b’s picture

Component: Code (general) » Code feedapi_node
Status: Active » Postponed (maintainer needs more info)

The issue is in fact that feedapi_node uses only node_save() to save nodes.

As much of the rest of Drupal, node manipulation is form driven. The only way to correctly create a node is to use to simulate its submission by way of drupal_execute(). Alas, this is way too slow. I don't really have a good solution here.

alex_b’s picture