From 4bc5562ffa61cc82c9ce07c179d1591539973121 Mon Sep 17 00:00:00 2001 From: Christian Burk Date: Wed, 17 Jan 2024 10:10:42 -0600 Subject: [PATCH] VACMS-14623: Adds explicit alias toggle --- docroot/modules/custom/va_gov_backend/va_gov_backend.module | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docroot/modules/custom/va_gov_backend/va_gov_backend.module b/docroot/modules/custom/va_gov_backend/va_gov_backend.module index d2d9ab1493..166de635c3 100644 --- a/docroot/modules/custom/va_gov_backend/va_gov_backend.module +++ b/docroot/modules/custom/va_gov_backend/va_gov_backend.module @@ -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; + } } }