Node keep can be wrongly installed without creating the alias_keeper field

Created on 18 May 2023, about 1 year ago
Updated 28 March 2024, 3 months ago

Problem/Motivation

When the site is installed from configuration, the pathauto module has a higher weight (1) than the node_keep module (0). As a consequence, the node_keep is installed first, and at that moment the pathauto module is not installed yet. As consequence, when the hook_entity_base_field_info function is executed, the pathauto module is not installed, so the alias_keeper field is not created.

Steps to reproduce

  • Install a site with the minimal profile
  • Install node_keep module
  • drush cex
  • drush si --existing-config
  • drush sqlc
  • desc node_field_data
  • Check the alias_keeper field is not part of the node_field_data table

Proposed resolution

Since pathauto module is installed in most of the sites, the simplest solution is to add it as a dependency. An alternative solution could be to increase the weight of the node_keep module.

  • Add dependency on the pathauto module
  • Remove the code checking if the pathauto module is installed because is not needed

Remaining tasks

  • Patch
  • Review
  • Test

User interface changes

None

API changes

The module node_keep will depend on core pathauto module.

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain akalam

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

Merge Requests

Comments & Activities

Production build 0.69.0 2024