When Expire menus is enabled and a Panelized node is saved it causes the menu link to be deleted. This is due to menu_node_prepare being called which adds the $node->menu item to the node but doesn't set $node->menu['enabled'] to TRUE so when Panelizer triggers the node_save after this menu_node_save deletes the menu link. I'm not sure if we can just set the $menu_node->menu['enabled'] = TRUE in expire.module or whether that will have unintended consequences when a user intends to remove the menu link. Attached is a patch that adds that -- stolen liberally from Feeds -- but I confess I haven't tested it to see whether it functions as desired.

CommentFileSizeAuthor
expire_panelizer_menu_link.patch660 byteswwhurley
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Spleshka’s picture

Version: 7.x-1.0-alpha3 » 7.x-2.x-dev
Status: Active » Needs work

Please, re-roll your patch for new branch 7.x-2.x.

DamienMcKenna’s picture

Issue summary: View changes
Issue tags: +panelizer

Tag.

Spleshka’s picture

Status: Needs work » Postponed (maintainer needs more info)

So currently Expire 7.x-2.x supports menu items expiration. Please, check if there are any issues with Panelizer. I leave issue postponed till I get some info about it.

Chris Burge’s picture

Status: Postponed (maintainer needs more info) » Closed (duplicate)
Related issues: +#1451336: Reverting a node revision deletes menu item

This issue is a duplicate of #1451336: Reverting a node revision deletes menu item. See comment #5. A patch was committed just a few weeks before this issue was opened.