Skip to content

Commit

Permalink
VACMS-14623: Adds explicit alias toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
omahane authored and swirtSJW committed Jan 18, 2024
1 parent 1802869 commit 4bc5562
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions docroot/modules/custom/va_gov_backend/va_gov_backend.module
Original file line number Diff line number Diff line change
Expand Up @@ -1945,6 +1945,12 @@ function _va_gov_backend_disable_autopath_alias(FieldableEntityInterface $entity
// Disable the pathauto pattern.
$entity->path->pathauto = 0;
}
elseif (!$path_alias_set) {
// If this is not set pathauto already is 0,
// so we need to explicitly set it to 1
// to get an alias generated.
$entity->path->pathauto = 1;
}
}
}

Expand Down

0 comments on commit 4bc5562

Please sign in to comment.