Created
February 19, 2015 01:36
-
-
Save amcgowanca/1f03f89fa2f96a80ff65 to your computer and use it in GitHub Desktop.
Drupal 7: Patch for panelizer for menu links "disappearing"
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/plugins/entity/PanelizerEntityNode.class.php b/plugins/entity/PanelizerEntityNode.class.php | |
index 5ea50a1..14027ce 100644 | |
--- a/plugins/entity/PanelizerEntityNode.class.php | |
+++ b/plugins/entity/PanelizerEntityNode.class.php | |
@@ -32,6 +32,9 @@ class PanelizerEntityNode extends PanelizerEntityDefault { | |
if (isset($entity->workbench_moderation)) { | |
$entity->workbench_moderation['updating_live_revision'] = TRUE; | |
} | |
+ if (!empty($entity->menu['link_title'])) { | |
+ $entity->menu['enabled'] = TRUE; | |
+ } | |
node_save($entity); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
An odd behaviour was observed when panelizer was patched for the sake cooperating with the Workbench module in Drupal 7 in which menu links prior to the
node_save($entity)
that were accessible atnode_save($entity)
did not contain the elementenabled
that would be set toTRUE
orFALSE
. This is one possible solution to resolve this.