diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md
index ff195a37ee..c0eaf680a3 100644
--- a/.github/CONTRIBUTING.md
+++ b/.github/CONTRIBUTING.md
@@ -208,11 +208,13 @@ There will be times that we really like your proposed changes and we’ll finish
The Core Contributors team consists of one member of Umbraco HQ, [Sebastiaan][Sebastiaan], who gets assistance from the following community members who have committed to volunteering their free time:
-- [Nathan Woulfe][Nathan Woulfe]
-- [Joe Glombek][Joe Glombek]
-- [Laura Weatherhead][Laura Weatherhead]
+- [Busra Sengul][Busra Sengul]
+- [Emma Garland][Emma Garland]
+- [George Bidder][George Bidder]
+- [Jason Elkin][Jason Elkin]
+- [Laura Neto][Laura Neto]
- [Michael Latouche][Michael Latouche]
-- [Owain Williams][Owain Williams]
+- [Sebastiaan][Sebastiaan]
These wonderful people aim to provide you with a reply to your PR, review and test out your changes and on occasions, they might ask more questions. If they are happy with your work, they'll let Umbraco HQ know by approving the PR. HQ will have final sign-off and will check the work again before it is merged.
@@ -227,12 +229,14 @@ These wonderful people aim to provide you with a reply to your PR, review and te
-[Nathan Woulfe]: https://github.com/nathanwoulfe "Nathan's GitHub profile"
-[Joe Glombek]: https://github.com/glombek "Joe's GitHub profile"
-[Laura Weatherhead]: https://github.com/lssweatherhead "Laura's GitHub profile"
+[Busra Sengul]: https://github.com/busrasengul "Busra's GitHub profile"
+[Emma Garland]: https://github.com/emmagarland "Emma's GitHub profile"
+[George Bidder]: https://github.com/georgebid "George's GitHub profile"
+[Jason Elkin]: https://github.com/jasonelkin "Jason's GitHub profile"
+[Kyle Eck]: https://github.com/teckspeed "Kyle's GitHub profile"
+[Laura Neto]: https://github.com/lauraneto "Laura's GitHub profile"
[Michael Latouche]: https://github.com/mikecp "Michael's GitHub profile"
-[Owain Williams]: https://github.com/OwainWilliams "Owain's GitHub profile"
-[Sebastiaan]: https://github.com/nul800sebastiaan "Senastiaan's GitHub profile"
+[Sebastiaan]: https://github.com/nul800sebastiaan "Sebastiaan's GitHub profile"
[ Umbrabot ]: https://github.com/umbrabot
[git flow]: https://jeffkreeftmeijer.com/git-flow/ "An explanation of git flow"
[sync fork ext]: http://robots.thoughtbot.com/post/5133345960/keeping-a-git-fork-updated "Details on keeping a git fork updated"
diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/da.xml b/src/Umbraco.Core/EmbeddedResources/Lang/da.xml
index cf0518613d..564f500b6b 100644
--- a/src/Umbraco.Core/EmbeddedResources/Lang/da.xml
+++ b/src/Umbraco.Core/EmbeddedResources/Lang/da.xml
@@ -389,7 +389,7 @@
Element-typeDefinerer skabelonen for et sæt at egenskaber, der kan anvendes som skema i
- avancerede felter som f.eks. 'Block List' eller 'Nested Content'.
+ avancerede felter som f.eks. 'Block List' eller 'Block Grid'.
KompositionDefinerer et sæt genbrugbare egenskaber, der kan inkluderes i definitionen af
@@ -1647,7 +1647,7 @@ Mange hilsner fra Umbraco robotten
Tillad segmenteringElement-typeEr en Element-type
- En Element-type er tiltænkt brug i f.eks. Nested Content, ikke i indholdstræet.
+ En Element-type er tiltænkt brug i andre Dokumenttyper, ikke i indholdstræet.
En Dokumenttype kan ikke ændres til en Element-type efter den er blevet brugt til
at oprette en eller flere indholds elementer.
diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml
index efc125d6d5..56a0838896 100644
--- a/src/Umbraco.Core/EmbeddedResources/Lang/en.xml
+++ b/src/Umbraco.Core/EmbeddedResources/Lang/en.xml
@@ -394,7 +394,7 @@
Element TypeDefines the schema for a repeating set of properties, for example, in a 'Block
- List' or 'Nested Content' property editor.
+ List' or 'Block Grid' property editor.
CompositionDefines a re-usable set of properties that can be included in the definition of
@@ -1861,9 +1861,8 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
Allow segmentationElement TypeIs an Element Type
- An Element Type is meant to be used for instance in Nested Content, and not in the
- tree.
-
+ An Element Type is meant to be used within other Document Types, and not in the Content
+ tree.A document Type cannot be changed to an Element Type once it has been used to
create one or more content items.
diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
index 78fcd0f13d..d85e6d7eb4 100644
--- a/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
+++ b/src/Umbraco.Core/EmbeddedResources/Lang/en_us.xml
@@ -410,7 +410,7 @@
Element TypeDefines the schema for a repeating set of properties, for example, in a 'Block
- List' or 'Nested Content' property editor.
+ List' or 'Block Grid' property editor.
CompositionDefines a re-usable set of properties that can be included in the definition of
@@ -1927,7 +1927,7 @@ To manage your website, simply open the Umbraco backoffice and start adding cont
Allow segmentationElement TypeIs an Element Type
- An Element Type is meant to be used for instance in Nested Content, and not in the
+ An Element Type is meant to be used within other Document Types, and not in the Content
tree.
A Document Type cannot be changed to an Element Type once it has been used to
diff --git a/src/Umbraco.Core/EmbeddedResources/Lang/it.xml b/src/Umbraco.Core/EmbeddedResources/Lang/it.xml
index 2430542e66..5e45248d48 100644
--- a/src/Umbraco.Core/EmbeddedResources/Lang/it.xml
+++ b/src/Umbraco.Core/EmbeddedResources/Lang/it.xml
@@ -2660,6 +2660,7 @@ Per gestire il tuo sito web, è sufficiente aprire il backoffice di Umbraco e in
Usato nei tipi di membroNon ci sono riferimenti a tipi di membro.Usato da
+ Correlato ai seguenti elementiUsato nei documentiUsato nei membriUsato nei media
diff --git a/src/Umbraco.Core/Extensions/PublishedElementExtensions.cs b/src/Umbraco.Core/Extensions/PublishedElementExtensions.cs
index c85178c85c..440962cd76 100644
--- a/src/Umbraco.Core/Extensions/PublishedElementExtensions.cs
+++ b/src/Umbraco.Core/Extensions/PublishedElementExtensions.cs
@@ -134,6 +134,27 @@ public static class PublishedElementExtensions
#endregion
+ #region CheckVariation
+ ///
+ /// Method to check if VariationContext culture differs from culture parameter, if so it will update the VariationContext for the PublishedValueFallback.
+ ///
+ /// The requested PublishedValueFallback.
+ /// The requested culture.
+ /// The requested segment.
+ ///
+ private static void EventuallyUpdateVariationContext(IPublishedValueFallback publishedValueFallback, string? culture, string? segment)
+ {
+ IVariationContextAccessor? variationContextAccessor = publishedValueFallback.VariationContextAccessor;
+
+ //If there is a difference in requested culture and the culture that is set in the VariationContext, it will pick wrong localized content.
+ //This happens for example using links to localized content in a RichText Editor.
+ if (!string.IsNullOrEmpty(culture) && variationContextAccessor?.VariationContext?.Culture != culture)
+ {
+ variationContextAccessor!.VariationContext = new VariationContext(culture, segment);
+ }
+ }
+ #endregion
+
#region Value
///
@@ -174,6 +195,8 @@ public static class PublishedElementExtensions
{
IPublishedProperty? property = content.GetProperty(alias);
+ EventuallyUpdateVariationContext(publishedValueFallback, culture, segment);
+
// if we have a property, and it has a value, return that value
if (property != null && property.HasValue(culture, segment))
{
diff --git a/src/Umbraco.Core/Extensions/StringExtensions.cs b/src/Umbraco.Core/Extensions/StringExtensions.cs
index 6a76650523..c1abeb8650 100644
--- a/src/Umbraco.Core/Extensions/StringExtensions.cs
+++ b/src/Umbraco.Core/Extensions/StringExtensions.cs
@@ -1040,14 +1040,15 @@ public static class StringExtensions
throw new ArgumentNullException(nameof(text));
}
- var pos = text.IndexOf(search, StringComparison.InvariantCulture);
+ ReadOnlySpan spanText = text.AsSpan();
+ var pos = spanText.IndexOf(search, StringComparison.InvariantCulture);
if (pos < 0)
{
return text;
}
- return text.Substring(0, pos) + replace + text.Substring(pos + search.Length);
+ return string.Concat(spanText[..pos], replace.AsSpan(), spanText[(pos + search.Length)..]);
}
///
diff --git a/src/Umbraco.Core/Models/PropertyGroup.cs b/src/Umbraco.Core/Models/PropertyGroup.cs
index 034770cdfc..9d23c85a9b 100644
--- a/src/Umbraco.Core/Models/PropertyGroup.cs
+++ b/src/Umbraco.Core/Models/PropertyGroup.cs
@@ -2,6 +2,7 @@ using System.Collections.Specialized;
using System.Diagnostics;
using System.Diagnostics.CodeAnalysis;
using System.Runtime.Serialization;
+
using Umbraco.Cms.Core.Models.Entities;
namespace Umbraco.Cms.Core.Models;
@@ -132,7 +133,7 @@ public class PropertyGroup : EntityBase, IEquatable
}
public bool Equals(PropertyGroup? other) =>
- base.Equals(other) || (other != null && Type == other.Type && Alias == other.Alias);
+ base.Equals(other) || (other != null && Type == other.Type && Alias == other.Alias && Id == other.Id);
public override int GetHashCode() => (base.GetHashCode(), Type, Alias).GetHashCode();
diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs
index 49c83b4c9d..77a5d84421 100644
--- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs
+++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs
@@ -30,7 +30,7 @@ public class PropertyTypeCollection : KeyedCollection, IN
// This baseclass calling is needed, else compiler will complain about nullability
///
- public bool IsReadOnly => ((ICollection)this).IsReadOnly;
+ public bool IsReadOnly => false;
// 'new' keyword is required! we can explicitly implement ICollection.Add BUT since normally a concrete PropertyType type
// is passed in, the explicit implementation doesn't get called, this ensures it does get called.
diff --git a/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs
index 729f7dd6bc..111d747ec1 100644
--- a/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/IPublishedValueFallback.cs
@@ -5,6 +5,11 @@ namespace Umbraco.Cms.Core.Models.PublishedContent;
///
public interface IPublishedValueFallback
{
+ ///
+ /// VariationContextAccessor that is not required to be implemented, therefore throws NotImplementedException as default.
+ ///
+ IVariationContextAccessor VariationContextAccessor { get { throw new NotImplementedException(); } set { throw new NotImplementedException(); } }
+
///
/// Tries to get a fallback value for a property.
///
diff --git a/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs b/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs
index 8a50323f12..fe914e95d4 100644
--- a/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs
+++ b/src/Umbraco.Core/Models/PublishedContent/PublishedValueFallback.cs
@@ -20,6 +20,8 @@ public class PublishedValueFallback : IPublishedValueFallback
_variationContextAccessor = variationContextAccessor;
}
+ public IVariationContextAccessor VariationContextAccessor { get { return _variationContextAccessor; } }
+
///
public bool TryGetValue(IPublishedProperty property, string? culture, string? segment, Fallback fallback, object? defaultValue, out object? value) =>
TryGetValue