Data not insert to table views_url_alias on entity insert/update/delete

Created on 15 December 2023, 11 months ago
Updated 19 March 2024, 8 months ago

Problem
Data not insert to table views_url_alias on entity insert/update/delete
hook_path_insert / hook_path_update/ hook_path_delete is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0
Steps to reproduce
Install module, create/update/delete node with url alias, after the action, data will not update in the table views_url_alias

Proposed resolution

Before:

hook_path_insert($path)
hook_path_update($path)
hook_path_delete($path)

After:

hook_entity_insert(Drupal\Core\Entity\EntityInterface $entity)
hook_path_alias_insert(Drupal\path_alias\PathAliasInterface $path_alias)

hook_entity_update(Drupal\Core\Entity\EntityInterface $entity)
hook_path_alias_update(Drupal\path_alias\PathAliasInterface $path_alias)

hook_entity_delete(Drupal\Core\Entity\EntityInterface $entity)
hook_path_alias_delete(Drupal\path_alias\PathAliasInterface $path_alias)

Reference:
https://www.drupal.org/node/3013865 β†’

πŸ› Bug report
Status

Fixed

Version

3.0

Component

Code

Created by

πŸ‡¨πŸ‡³China sakural

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024