Commit 8d4ba99a authored by Igor Biki's avatar Igor Biki
Browse files

Merge branch 'ISTWCMS-5752-tstruyk-url-alias-contacts' into '1.0.x'

ISTWCMS-5752: Hot fix for contacts pathauto pattern changing.

See merge request !91
parents 2e9eb268 c37f51b8
......@@ -91,6 +91,21 @@ class MigrateSubscriber implements EventSubscriberInterface {
->set(PathautoState::getPathautoStateKey($entity_id), PathautoState::CREATE);
// Contacts content type pathauto pattern has changed. If no custom
// alias was created, then set the nodes url alias to be autogenerated, then
// force it to be generated. This show be fixed in
//, however the patch
// still needs work. If the future this can be replaced. This will solve
// the problem, not only for contact content type, but all Content Entities
// (taxonomy and nodes).
$match = [];
if (preg_match('#/about/people/.*#', $migrated_alias, $match)) {
if ($entity && $entity->bundle() === 'uw_ct_contact') {
->set(PathautoState::getPathautoStateKey($entity_id), PathautoState::CREATE);
$this->pathautoGenerator->updateEntityAlias($entity, 'update', ['force' => TRUE]);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment