diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index 2f567abb49..22f0555f68 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -48,22 +48,24 @@ function standard_install() { // Allow authenticated users to use shortcuts. user_role_grant_permissions(RoleInterface::AUTHENTICATED_ID, ['access shortcuts']); - // Populate the default shortcut set. - $shortcut = Shortcut::create([ - 'shortcut_set' => 'default', - 'title' => t('Add content'), - 'weight' => -20, - 'link' => ['uri' => 'internal:/node/add'], - ]); - $shortcut->save(); + if (!\Drupal::service('config.installer')->isSyncing()) { + // Populate the default shortcut set. + $shortcut = Shortcut::create([ + 'shortcut_set' => 'default', + 'title' => t('Add content'), + 'weight' => -20, + 'link' => ['uri' => 'internal:/node/add'], + ]); + $shortcut->save(); - $shortcut = Shortcut::create([ - 'shortcut_set' => 'default', - 'title' => t('All content'), - 'weight' => -19, - 'link' => ['uri' => 'internal:/admin/content'], - ]); - $shortcut->save(); + $shortcut = Shortcut::create([ + 'shortcut_set' => 'default', + 'title' => t('All content'), + 'weight' => -19, + 'link' => ['uri' => 'internal:/admin/content'], + ]); + $shortcut->save(); + } // Allow all users to use search. user_role_grant_permissions(RoleInterface::ANONYMOUS_ID, ['search content']);