Conversation
… pattern for other instances.
See #335 (comment)
Ohhh... brain... |
finnlewis
left a comment
There was a problem hiding this comment.
Brilliant, this works a treat!
New content is no longer created with the subdir in the path alias.
Existing pathauto patterns are updated with the update hooks.
We'll want some appropriate release notes to advise people who this affects to regenerate path aliases.
For example: drush pathauto:aliases-generate
|
@finnlewis Should it need to? won't the paths get updated on the next save of a page. The path alaises should be the same anyway (unless you have been running LGD in a sub directory). |
|
Fair point @andybroomfield, I guess it'd be an optional tidy up for those running in a sub-directory or on a language path. |
|
Out of interest, would there be any Impact for those who have used this path pattern in other places. Assume making the same update is advised there too. |
|
I have tested on two existing sites. I re-saved content and saw no issues. I ran a risky bulk regenerate via drush without running database updates and I saw some problems /housing/housing/council-housing .I ran a bulk regenerate with everything up to date and using the UI and saw no issues. I have not yet tested directories or step by steps. |
What does this change?
Fixes prefixes (subdirectory, language) being included in parent path pattern for other instances.
See #335 (comment)
How to test
Set up site, or upgrade site, with multilingual and/or in a subdirectory. Create services, sub landing and pages. The paths should be correct and not repeat the language or subdirectory prefix to the path.
Present tests should continue to pass 🤞 if we want to test against this regressing then we'll have to start maybe adding multilingual tests (not such a bad idea).