Loading varbase_seo.install +6 −6 Original line number Diff line number Diff line Loading @@ -115,7 +115,9 @@ function varbase_seo_install() { } /** * Issue #3265632: Fix Errors on Pathauto's settings page. * Issue #3265632: Fix Errors for messing Enabled entity types and Safe tokens. * * On the URL aliases settings page. */ function varbase_seo_update_90001() { Loading @@ -123,17 +125,15 @@ function varbase_seo_update_90001() { $pathauto_settings = \Drupal::service('config.factory')->getEditable('pathauto.settings'); // Add enable entity types if it was notin the pathauto settings in the active site configs. $enabled_entity_types = $$pathauto_settings->get('enabled_entity_types'); $enabled_entity_types = $pathauto_settings->get('enabled_entity_types'); if (isset($enabled_entity_types) && is_array($enabled_entity_types) && !(count($enabled_entity_types) > 0)) { $enabled_entity_types = ['user']; $pathauto_settings->set('enabled_entity_types', $enabled_entity_types)->save(TRUE); $pathauto_settings->set('enabled_entity_types', ['user'])->save(TRUE); } // Add the list of safe tokens if it was not in the pathauto settings in the active site configs. $safe_tokens = $$pathauto_settings->get('safe_tokens'); $safe_tokens = $pathauto_settings->get('safe_tokens'); if (isset($safe_tokens) && is_array($safe_tokens) && !(count($safe_tokens) > 0)) { Loading Loading
varbase_seo.install +6 −6 Original line number Diff line number Diff line Loading @@ -115,7 +115,9 @@ function varbase_seo_install() { } /** * Issue #3265632: Fix Errors on Pathauto's settings page. * Issue #3265632: Fix Errors for messing Enabled entity types and Safe tokens. * * On the URL aliases settings page. */ function varbase_seo_update_90001() { Loading @@ -123,17 +125,15 @@ function varbase_seo_update_90001() { $pathauto_settings = \Drupal::service('config.factory')->getEditable('pathauto.settings'); // Add enable entity types if it was notin the pathauto settings in the active site configs. $enabled_entity_types = $$pathauto_settings->get('enabled_entity_types'); $enabled_entity_types = $pathauto_settings->get('enabled_entity_types'); if (isset($enabled_entity_types) && is_array($enabled_entity_types) && !(count($enabled_entity_types) > 0)) { $enabled_entity_types = ['user']; $pathauto_settings->set('enabled_entity_types', $enabled_entity_types)->save(TRUE); $pathauto_settings->set('enabled_entity_types', ['user'])->save(TRUE); } // Add the list of safe tokens if it was not in the pathauto settings in the active site configs. $safe_tokens = $$pathauto_settings->get('safe_tokens'); $safe_tokens = $pathauto_settings->get('safe_tokens'); if (isset($safe_tokens) && is_array($safe_tokens) && !(count($safe_tokens) > 0)) { Loading