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

Bugfix: Do not allow routing content that is unpublished #17251

Merged
merged 8 commits into from
Oct 15, 2024

Conversation

bergmania
Copy link
Member

@bergmania bergmania commented Oct 11, 2024

Description

Ensures urls are not available if an item or one of the ancestors are unpublished.

To do this in a fast way, I needed to introduce a cached version of the publish status, as we cannot rely on IPublishedCache anymore.

The new IPublishStatusQueryService can be requested and is used by DocumentUrlService. It initialises itself on boot with a fast query of the status of all content.

Test

  • Setup a two languages and a culture variant doctype with some content (also nested)
  • Unpublish a single culture and verify you get 404 but the published cultures are still available
  • Unpublish all cultures and verify all pages gives 404.

@bergmania bergmania marked this pull request as ready for review October 11, 2024 16:51
…here the request comes from

There is an edge case where the incomming culure is fully capitalized while the read is camelcase
Copy link
Contributor

@Migaroez Migaroez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No more issues after the additional comming

Code looks good in general, few small comments

src/Umbraco.Core/Services/DocumentUrlService.cs Outdated Show resolved Hide resolved
src/Umbraco.Core/Services/DocumentUrlService.cs Outdated Show resolved Hide resolved
…x-routing-when-unpublishing

# Conflicts:
#	src/Umbraco.Web.UI.Client
@bergmania bergmania merged commit b477cf5 into release/15.0 Oct 15, 2024
12 of 15 checks passed
@bergmania bergmania deleted the v15/hotfix/fix-routing-when-unpublishing branch October 15, 2024 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants