FeedAPI calls node_object_prepare() on feed nodes before saving. It does this to give other modules a chance to add default values to the node object before saving. Feed Element Mapper bastardizes this behavior and does the mapping at this stage - which is a bad idea.

The proper stage would be 'presave' - AFTER a node has validated and BEFORE a node gets inserted or updated.

However, there may be problems with 'presave' as mappers may assume that mapping happens before 'validate'. A solution would be to add a direct call to _feedapi_mapper_map() to the node saving procedure in feedapi_node module.

CommentFileSizeAuthor
#1 364365_map_on_presave.patch642 bytesalex_b

Comments

alex_b’s picture

Status: Active » Needs review
StatusFileSize
new642 bytes

Map on 'presave'

alex_b’s picture

Status: Needs review » Closed (fixed)

Obsolete by changes in 2.x