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

Fix IContentBase.GetUdi() extension method to support document-blueprint entity type #16939

Merged
merged 3 commits into from
Sep 26, 2024

Conversation

ronaldbarendse
Copy link
Contributor

Prerequisites

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

Description

While implementing document blueprint container support in Deploy 14, I noticed document blueprints (IContent with Blueprint = true) were returning UDIs using the document entity type (e.g. umb://document/{GUID}, instead of umb://document-blueprint/{GUID}).

This PR adds tests for all supported entity types, fixes the issue and cleans up the UdiGetterExtensions class to remove redundant code. The added tests should be sufficient to verify the issue, but reverting to the first commit will show the failing test:

Expected string length 57 but was 47. Strings differ at index 14.
Expected: "umb://document-blueprint/6ad82c70685c4e049b36d81bd779d16f"
But was:  "umb://document/6ad82c70685c4e049b36d81bd779d16f"
-------------------------^

Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

Changes look good to me and can see the passing tests have verified the issue.

Please make sure you contact one of the CMS team directly (Lasse, Bjarke) just to make sure this doesn't fall between the HQ and community teams.

@bergmania bergmania merged commit 609b5f7 into v14/dev Sep 26, 2024
16 of 17 checks passed
@bergmania bergmania deleted the v14/bugfix/udigetterextensions-contentbase branch September 26, 2024 05:47
bergmania pushed a commit that referenced this pull request Sep 26, 2024
…print entity type (#16939)

* Add tests for all UDI entity types

* Fix IContentBase UDI entity type for blueprints

* Remove redundant switch statements and reorder methods

(cherry picked from commit 609b5f7)
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