Page path alias is not actually saved

Created on 21 August 2025, 26 days ago

Overview

I reproduced this with current xb-demo but @pameela reproduced it outside of xb-demo too.

  • When creating new pages a path alias is suggested but when saving it it is not actually saved (and not loaded back either).
  • When creating a path alias outside of XB, that is properly applied and loaded back on the admin UI. However, read on...
  • When editing existing pages, path alias changes are not actually saved (if there was a manual path alias, since we could not add one from the XB UI).

Video attached showing the new page creation flow not saving path alias (this is using xb-demo, but @pameela reproduced this outside of xb-demo too).

Proposed resolution

User interface changes

πŸ› Bug report
Status

Active

Version

1.0

Component

… to be triaged

Created by

πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

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

Merge Requests

Comments & Activities

  • Issue created by @GΓ‘bor Hojtsy
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    @mglaman suggests this is caused by pathato being enabled, and indeed, I have pathauto in xb-demo. I don't know if @pameela has pathauto, but I assume she was testing with Drupal CMS 2.x which has it.

    When pathauto is installed, this hook is useful to work around this per @mglaman:

      #[Hook('xb_page_presave')]
      public function ensurePathautoSkipped(Page $page): void {
        $page->get('path')->first()->set('pathauto', PathautoState::SKIP);
      }
    
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Attached patch for composer patching needs (eg. in xb-demo).

    I think some form of this needs to go to XB to make it viable on a site. Not the fix as-is, although it is nicely compartmentalised outside of the normal XB flow to show it is a workaround. Will leave it to maintainers to triage though :)

  • Pipeline finished with Failed
    26 days ago
    Total: 877s
    #578287
  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    Escalating this. Drupal CMS needs this, because without it, we cannot ship site templates that work in a consistent way. We can patch XB for now, but this will need to get fixed before Drupal CMS can release an XB-ready version.

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Discussing this with Lauri he indicated

    I don't think [this] is a must have. You could just disable pathauto for XB pages and rely on the XB built in path generation

    Is that possible to configure in Drupal CMS?

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    I checked how can pathauto be disabled on xb pages in xb-demo. However, it looks from pathauto's simple config that only nodes are enabled for patterns:

    enabled_entity_types:
      - user
    punctuation:
      hyphen: 1
    verbose: false
    separator: '-'
    max_length: 100
    max_component_length: 100
    transliterate: true
    reduce_ascii: false
    case: true
    ignore_words: 'a, an, as, at, before, but, by, for, from, is, in, into, like, of, off, on, onto, per, since, than, the, this, that, to, up, via, with'
    update_action: 2
    safe_tokens:
      - alias
      - path
      - join-path
      - login-url
      - url
      - url-brief

    Also this is the only thing that has a pathauto pattern entity:

    However when I went to the Pathauto settings page, XB pages seem to be enabled for pattens but no way to disable them:

    Where is this enforcement coming from?

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Moving to Canvas.

  • Merge request !43ported patch over from xb β†’ (Merged) created by GΓ‘bor Hojtsy
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Patch for composer patches.

  • Pipeline finished with Failed
    8 days ago
    Total: 1136s
    #592750
  • πŸ‡ΊπŸ‡ΈUnited States darren oh Lakeland, Florida

    darren oh β†’ made their first commit to this issue’s fork.

  • Pipeline finished with Failed
    7 days ago
    Total: 1094s
    #593103
  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Updated patch with Darren's fix (thanks!).

  • πŸ‡­πŸ‡ΊHungary GΓ‘bor Hojtsy Hungary

    Duh that was for XB :D Here is the one for Canvas. Sorry for the noise.

  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    This seems to be handling a subset of πŸ› XB pages doesn't respect Pathauto widget Active .

    How can there be a bug in Canvas if we've never worked on pathauto compatibility? πŸ˜… β†’ changing issue category

    The MR looks great (hence approved)! πŸ‘

    However, but CI is not passing. AFAICT only because pathauto needs to become a dev dependency first πŸ™ Happy to merge when green πŸ‘

  • πŸ‡ΊπŸ‡ΈUnited States phenaproxima Massachusetts

    This is no longer a Drupal CMS critical, because we are working around it in our helper module. It would be great to fix it before stable, but if that doesn't happen, Drupal CMS will not be broken by it. Untagging.

  • Pipeline finished with Failed
    7 days ago
    Total: 1093s
    #594020
  • πŸ‡§πŸ‡ͺBelgium wim leers Ghent πŸ‡§πŸ‡ͺπŸ‡ͺπŸ‡Ί

    #16 is not yet addressed: pathauto needs to become a dev dependency for it to pass CI.

  • Pipeline finished with Canceled
    6 days ago
    Total: 93s
    #594241
  • Pipeline finished with Failed
    6 days ago
    Total: 10182s
    #594242
Production build 0.71.5 2024