From 0fd0cac0e0fbdaf01f43af0737e03a40df28561c Mon Sep 17 00:00:00 2001 From: Bas van der Heijden Date: Thu, 2 Oct 2014 17:37:36 +0200 Subject: [PATCH 1/5] Make sure jQuery selectors are inside context --- pathauto.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pathauto.js b/pathauto.js index be49cd6..7bea583 100644 --- a/pathauto.js +++ b/pathauto.js @@ -3,8 +3,8 @@ Drupal.behaviors.pathFieldsetSummaries = { attach: function (context) { $('fieldset.path-form', context).drupalSetSummary(function (context) { - var path = $('.form-item-path-alias input').val(); - var automatic = $('.form-item-path-pathauto input').attr('checked'); + var path = $('.form-item-path-alias input', context).val(); + var automatic = $('.form-item-path-pathauto input', context).attr('checked'); if (automatic) { return Drupal.t('Automatic alias'); From 9066b19c1d6f53862db1847b37652000cd673836 Mon Sep 17 00:00:00 2001 From: Bas van der Heijden Date: Thu, 2 Oct 2014 17:37:47 +0200 Subject: [PATCH 2/5] Modify if to else if --- pathauto.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pathauto.js b/pathauto.js index 7bea583..52dcf12 100644 --- a/pathauto.js +++ b/pathauto.js @@ -9,7 +9,7 @@ Drupal.behaviors.pathFieldsetSummaries = { if (automatic) { return Drupal.t('Automatic alias'); } - if (path) { + else if (path) { return Drupal.t('Alias: @alias', { '@alias': path }); } else { From 9e2ad6f7b70a0166ed783d5dde8a374083b06c48 Mon Sep 17 00:00:00 2001 From: Bas van der Heijden Date: Thu, 2 Oct 2014 17:53:42 +0200 Subject: [PATCH 3/5] Removed unused PATHAUTO_IGNORE_WORDS constant in module file --- pathauto.module | 5 ----- 1 file changed, 5 deletions(-) diff --git a/pathauto.module b/pathauto.module index 67c7b2b..c0c5938 100644 --- a/pathauto.module +++ b/pathauto.module @@ -26,11 +26,6 @@ use Drupal\Core\Routing\RouteMatchInterface; use Drupal\node\Entity\Node; use Drupal\user\Entity\User; -/** - * The default ignore word list. - */ -define('PATHAUTO_IGNORE_WORDS', 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with'); - /** * Implements hook_hook_info(). */ From 28936ef56a9bd6dbd0661817af695499189a9e8c Mon Sep 17 00:00:00 2001 From: Bas van der Heijden Date: Thu, 2 Oct 2014 18:09:36 +0200 Subject: [PATCH 4/5] Removed taxonomy_get_tree in favor of the \Drupal::entityManager() --- src/PathautoManager.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PathautoManager.php b/src/PathautoManager.php index 2bea09a..3959bc4 100644 --- a/src/PathautoManager.php +++ b/src/PathautoManager.php @@ -530,7 +530,7 @@ public function updateAlias(EntityInterface $entity, $op, array $options = array * depending on the $load_entities parameter. */ protected function getTermTree($vid, $parent = 0, $max_depth = NULL, $load_entities = FALSE) { - return taxonomy_get_tree($vid, $parent, $max_depth, $load_entities); + return \Drupal::entityManager()->getStorage('taxonomy_term')->loadTree($vid, $parent, $max_depth, $load_entities); } /** From c609b6e61d75cf4f1e7fc40f4b703930de9ddff3 Mon Sep 17 00:00:00 2001 From: Bas van der Heijden Date: Fri, 3 Oct 2014 16:02:01 +0200 Subject: [PATCH 5/5] Removed duplicate ignore_words --- config/install/pathauto.settings.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/config/install/pathauto.settings.yml b/config/install/pathauto.settings.yml index 6cf57fb..fa6a105 100644 --- a/config/install/pathauto.settings.yml +++ b/config/install/pathauto.settings.yml @@ -5,7 +5,6 @@ max_length : 100 max_component_length: 100 transliterate : FALSE reduce_ascii : FALSE -ignore_words : ', in, is,that, the , this, with, ' case : 1 ignore_words : 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with' update_action : 2