Skip to content

Umbraco Engage UmbracoUrlAlias Fix - Fixes #19654 (#19827)#19850

Merged
AndyButland merged 1 commit intomainfrom
v16/bugfix/make-variation-context-aware-of-property-alias
Aug 4, 2025
Merged

Umbraco Engage UmbracoUrlAlias Fix - Fixes #19654 (#19827)#19850
AndyButland merged 1 commit intomainfrom
v16/bugfix/make-variation-context-aware-of-property-alias

Conversation

@AndyButland
Copy link
Contributor

This is an Umbraco 16 cherry-pick update of #19827 addressing #19654

@cornehoskam - would you be in a position to test this with Engage 16, to verify that the situation is resolved here too please?

* Fixes #19654

Adds the propertyAlias to the VariationContext so that products implementing the GetSegment method are aware which propertyAlias it's being called for

* Re-implement original variation context for backwards compatibility

* Fixes hidden overload method

Ensures the `GetSegment` method overload is not hidden when a null `propertyAlias` is passed.

* Resolve backward compatibility issues.

* Improved comments.

---------

Co-authored-by: Andy Butland <[email protected]>
# Conflicts:
#	src/Umbraco.PublishedCache.NuCache/Property.cs
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds support for property alias to the variation context system to address issues with Umbraco Engage UmbracoUrlAlias functionality. The changes enhance the existing variation context methods to accept and utilize property alias information for more granular segment handling.

  • Enhanced VariationContext and VariationContextAccessor to support property alias parameter
  • Updated all property value retrieval methods to pass property alias to variation context
  • Added backward compatibility through method overloads with obsolete markers

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
PublishedProperty.cs Stores property type alias and passes it to all ContextualizeVariation calls
VariationContextAccessorExtensions.cs Adds new method overloads with property alias parameter and marks old ones obsolete
VariationContext.cs Adds virtual GetSegment method that accepts property alias parameter
PublishedValueFallback.cs Updates all ContextualizeVariation calls to include property alias parameter

@cornehoskam
Copy link
Contributor

Hi @AndyButland,

It was a bit difficult to test haha, but these changes work in Engage V16 as well (just like V13!).
All good with me to get this merged up when you're ready!

@AndyButland
Copy link
Contributor Author

Great, thanks for checking.

@AndyButland AndyButland merged commit af87426 into main Aug 4, 2025
25 of 26 checks passed
@AndyButland AndyButland deleted the v16/bugfix/make-variation-context-aware-of-property-alias branch August 4, 2025 11:56
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.

3 participants