Autosave publish process does not acknowledge pathauto deactivation

Created on 22 May 2025, about 2 months ago

Postponed on ๐Ÿ“Œ Confirm Semi-coupled form elements can work with State API visibility Active - which is needed to make the "Generate automatic URL alias" checkbox work at all

Overview

This probably isn't pathauto specific, but this is where I spotted it.

If pathauto is enabled and "Generate automatic URL alias" is unchecked in the XB form, the pattern will still be applied.

I found a quick fix for this by adding the following to the APIAutoSaveController

 if (get_class($entity->path) === 'Drupal\pathauto\PathautoFieldItemList' && $auto_save['data']['entity_form_fields']['path[0][pathauto]'] === FALSE) {
          $entity->path->__set('pathauto', 0);
        }

I think there's a tidier solution available, but starting with something that works certainly can't hurt.

Proposed resolution

User interface changes

๐Ÿ› Bug report
Status

Postponed

Version

0.0

Component

Auto-save

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States bnjmnm Ann Arbor, MI

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