CM document import creates instead of updates if leave off leading slash

Created on 15 March 2024, 8 months ago

Problem/Motivation

When performing a content model document import either via drush or hook_update, an existing content model document will not get updated and a new one will be created if you leave off the leading slash
example:
`drush content-model-documentation:import /admin/structure/types/manage/centralized_content/document` will update an existing if there is one
`drush content-model-documentation:import admin/structure/types/manage/centralized_content/document` will always create a duplicate and make repeated aliases and cause general mayhem.

This is caused by the alias lookup failing to find `admin/structure/types/manage/centralized_content/document` because aliases all begin with a leading slash.

Steps to reproduce

Proposed resolution

Make the lookup prepend the leading slash if none exists.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Content model document

Created by

πŸ‡ΊπŸ‡ΈUnited States swirt Florida

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

Comments & Activities

Production build 0.71.5 2024