diff --git a/islandlives.module b/islandlives.module index 5fefe6e..7c9839b 100644 --- a/islandlives.module +++ b/islandlives.module @@ -26,7 +26,7 @@ function islandlives_pathauto_pattern_alter(PathautoPatternInterface $pattern, a // Taxonomy Terms: Only act if the pattern has machine name `person_vocabulary`. if ($pattern->id() == 'person_vocabulary') { // If term has no PID... - $term = $context['data']['taxonomy_term']; + $term = $context['data']['term']; $pid = $term->get('field_pid')->value; if ($pid == NULL) { // Replace the PID with the TID in the alias.