diff --git a/plugins/FeedsNodeProcessor.inc b/plugins/FeedsNodeProcessor.inc index b3636073ce0b9686e90e2469127a634ef4b5259c..5aac21005887d1b6ab2af1d3ed7ff17da5030be9 100644 --- a/plugins/FeedsNodeProcessor.inc +++ b/plugins/FeedsNodeProcessor.inc @@ -46,6 +46,8 @@ class FeedsNodeProcessor extends FeedsProcessor { * * If the update existing method is not FEEDS_UPDATE_EXISTING, only the node * table will be loaded, foregoing the node_load API for better performance. + * + * @todo Reevaluate the use of node_object_prepare(). */ protected function entityLoad(FeedsSource $source, $nid) { if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) { @@ -57,6 +59,14 @@ class FeedsNodeProcessor extends FeedsProcessor { $node->uid = $this->config['author']; } node_object_prepare($node); + + // Workaround for issue #1247506. See #1245094 for backstory. + if (!empty($node->menu)) { + // If the node has a menu item(with a valid mlid) it must be flagged + // 'enabled'. + $node->menu['link']['enabled'] = (int) (bool) $node->menu['link']['mlid']; + } + // Populate properties that are set by node_object_prepare(). if ($this->config['update_existing'] == FEEDS_UPDATE_EXISTING) { $node->log = 'Updated by FeedsNodeProcessor';