From 4b187a18b886bd45b2e33e953c7ca522d9b5b14e Mon Sep 17 00:00:00 2001
From: webchick <webchick@24967.no-reply.drupal.org>
Date: Mon, 11 Jul 2011 23:37:21 -0400
Subject: [PATCH] Issue #1187906 by David_Rothstein, tstoeckler: Fixed Shortcut
 module cannot be installed via an install profile if the menu module wasn't
 installed first.

---
 modules/shortcut/shortcut.install | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/modules/shortcut/shortcut.install b/modules/shortcut/shortcut.install
index 9dbab806db37..60ee6be8ddf0 100644
--- a/modules/shortcut/shortcut.install
+++ b/modules/shortcut/shortcut.install
@@ -25,6 +25,13 @@ function shortcut_install() {
       'weight' => -19,
     ),
   );
+  // If Drupal is being installed, rebuild the menu before saving the shortcut
+  // set, to make sure the links defined above can be correctly saved. (During
+  // installation, the menu might not have been built at all yet, or it might
+  // have been built but without the node module's links in it.)
+  if (drupal_installation_attempted()) {
+    menu_rebuild();
+  }
   shortcut_set_save($shortcut_set);
 }
 
-- 
GitLab