Duplicate alias results in a Drupal rendered error message

Created on 18 May 2025, 19 days ago

Overview

When creating a page with a URL alias that already exists, two problems occur:

  1. Drupal error messages about duplicate aliases incorrectly render inside the preview
  2. The system allows publishing content with invalid URL aliases despite this being invalid

Steps to reproduce:

  1. Create a page with path
    /new-page
  2. Publish the page
  3. Create another page with path
    /new-page
  4. Observe that a Drupal error message about duplicate aliases appears within the preview
  5. Publish the page
  6. Note that the page was published without validation errors, despite the path conflict

Proposed resolution

User interface changes

🐛 Bug report
Status

Active

Version

0.0

Component

Page builder

Created by

🇫🇮Finland lauriii Finland

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

Comments & Activities

  • Issue created by @lauriii
  • 🇫🇮Finland lauriii Finland
  • 🇫🇮Finland lauriii Finland
  • 🇫🇮Finland lauriii Finland

    Tested 📌 Handle data fetching errors in PageInfo component Active and looks like the fix there is great except the error message is now visible as a message in the preview.

  • 🇪🇸Spain isholgueras

    Is this still an issue? I can't reproduce it.

    What I've found is another issue (recorded in the gif). Here are the steps to reproduce:
    1. Create and publish a page with alias /new-page
    2. Create a second page, without alias, and publish
    3. Now, add the same alias /new-page, expect to have the error message
    4. Now try to publish and expect to have the error message in the publish modal.
    5. And here the ... issue??... modify the alias to 123 and now you have 2 different errors.

    The original issue, allowing to publish different nodes with the same alias, is not reproducible, but here is another (imho minor) issue.

    What do you think, @laurii?

  • 🇫🇮Finland lauriii Finland

    It looks like the final step of the issue summary has been solved most likely by 📌 Publish checks validation constraints, but not form validation Active . 👏 However, this issue is actually about the fact that the message shouldn't be visible in the preview. The error should be visible in the review changes panel and there should be a highlight inline the field. I think this issue should focus on just making sure that the message doesn't render and we need a follow-up to make sure that there's some indication of the error on the form.

  • 🇪🇸Spain isholgueras

    Oh, gotcha! Thanks @laurii

Production build 0.71.5 2024