Skip to content

Update pathauto update code #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
bennybobw opened this issue Apr 4, 2025 · 0 comments
Open

Update pathauto update code #1

bennybobw opened this issue Apr 4, 2025 · 0 comments

Comments

@bennybobw
Copy link
Collaborator

I just did a bunch of work to get the regular path stuff working in backdrop, including swapping out some config settings. These settings need review as well as updating the entity_translation_pathauto_alias_alter hook. This hook used to get called when an individual entity was updated as well on bulk updating the aliases but this is no longer the case. The commit I'm about to make will make use of hook_entity_update like backdrop core does.

bennybobw pushed a commit that referenced this issue Apr 4, 2025
It took me a long time to figure out the proper way to do this. After
reviewing how the path module now sets the langcode and updates the
automatic aliases, it became clear that the easiest way to handle the
case for aliases on translations was to completely override the core
path module's implementation path_entity_update and to do everything
myself in entity_translations_entity_update. We fall back to core's
path_entity_update in the case when we're not handling a translation.

I tried messing around with the path_pattern_alter and path_alias_alter
but those were proving to be more difficult than the hook_entity_update
route.

There is still a pathauto hook implemented in here. I adjusted the
variable_get calls on the settings page, but I still need to rewrite the
code for bulk updating automatic aliases, I have an open issue for this
over in
#1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant