Skip to content

Warn about un-routable content at publish time#17705

Merged
Zeegaan merged 1 commit intov13/devfrom
v13/fix/15943-warn-about-unroutable-content
Dec 9, 2024
Merged

Warn about un-routable content at publish time#17705
Zeegaan merged 1 commit intov13/devfrom
v13/fix/15943-warn-about-unroutable-content

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.

@Zeegaan
Copy link
Member

Zeegaan commented Dec 9, 2024

Looks good, tests good 🚀

@Zeegaan
Copy link
Member

Zeegaan commented Dec 9, 2024

Cherry picked for 13.6 🚀

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.

2 participants