CRM-21372: Fix fatal error adding profile on Drupal 8
authorDavid Snopek <dsnopek@gmail.com>
Tue, 31 Oct 2017 04:30:54 +0000 (23:30 -0500)
committerDavid Snopek <dsnopek@gmail.com>
Tue, 31 Oct 2017 04:30:54 +0000 (23:30 -0500)
CRM/Core/BAO/UFGroup.php
CRM/Utils/System/Drupal8.php

index 77400aeeeb1d326fa702fe674476ca7d4cbcaca5..493ec603ec29503704ad93f632c9c62625f841e4 100644 (file)
@@ -1542,13 +1542,10 @@ AND    ( entity_id IS NULL OR entity_id <= 0 )
     );
     CRM_Core_DAO::executeQuery($query, $p);
 
-    // do a menu rebuild if we are on drupal, so it gets all the new menu entries
-    // for user account
-    $config = CRM_Core_Config::singleton();
-    if ($menuRebuild &&
-      $config->userSystem->is_drupal
-    ) {
-      menu_rebuild();
+    // Do a menu rebuild, so it gets all the new menu entries for user account
+    if ($menuRebuild) {
+      $config = CRM_Core_Config::singleton();
+      $config->userSystem->updateCategories();
     }
   }
 
index b4b725ef3ef4681eb0127955189ca7b663689a46..8b6376217093bb3059ef5ea68c82f7944ebad519 100644 (file)
@@ -546,6 +546,13 @@ class CRM_Utils_System_Drupal8 extends CRM_Utils_System_DrupalBase {
     return TRUE;
   }
 
+  /**
+   * @inheritDoc
+   */
+  public function updateCategories() {
+    // @todo Is anything necessary?
+  }
+
   /**
    * @inheritDoc
    */