Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn about un-routable content at publish time #17705

Open
wants to merge 1 commit into
base: v13/dev
Choose a base branch
from

Conversation

kjac
Copy link
Contributor

@kjac kjac commented Dec 3, 2024

Prerequisites

  • I have added steps to test this contribution in the description below

If there's an existing issue for this PR then this fixes #15943 and #15850

Description

When content items with similar (not exactly the same) names are created, URL collisions can happen. See the linked issues for examples.

The content items can still be published and become available via the Delivery API (by ID), but they will not be routable. However, at this point, there is no indication of that, unless one looks at the "Info" section:

image

This PR adds a warning at publish time, to emphasise the issue:

image

The "no domains have been configured" warning

We already have a potential warning at play when publishing content - the "no domains have been configured" warning:

image

The purpose of this warning is partly the same as the new warning added by this PR: to tell the editors that content is not routable.

As it happens, the default culture is always routable - but the warning is still shown when publishing the default culture. I have changed that, because (long story short) it's the only way to detect URL collisions for the default culture.

To avoid spamming the editors with warnings, I have also made sure that the "no domains have been configured" warning takes precedence over the new warning from this PR.

V15+?

All of the affected code has been deleted in V14 🥳 which means we need to create a V15+ counterpart to this PR. As we are not entirely clear on the approach to fixing it in V15+, this task has been added to our internal backlog (46682).

Testing this PR

  1. Make sure that content can be published as per usual, as long as there is no collision with other content.
  2. Verify that the "content is not routable" warning appears when there is a URL collision.
  3. For multi lingual content, verify that the "no domans have been configured" warning takes precedence over this new warning. Note that this warning is now only displayed when publishing non-default cultures.
  4. For multi lingual content, verify that the "no domans have been configured" no longer appears when only publishing the default culture for a content item.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant