diff --git a/src/Umbraco.Core/Services/IdkMap.cs b/src/Umbraco.Core/Services/IdkMap.cs index ab858a75aa..7cf69f2e64 100644 --- a/src/Umbraco.Core/Services/IdkMap.cs +++ b/src/Umbraco.Core/Services/IdkMap.cs @@ -69,7 +69,7 @@ namespace Umbraco.Core.Services _dictionary[umbracoObjectType] = (id2key, key2id); } - internal void Set(IEnumerable<(int id, Guid key)> pairs, UmbracoObjectTypes umbracoObjectType) + internal void Populate(IEnumerable<(int id, Guid key)> pairs, UmbracoObjectTypes umbracoObjectType) { try { @@ -97,7 +97,7 @@ namespace Umbraco.Core.Services { // populate content and media items var types = new[] { Constants.ObjectTypes.Document, Constants.ObjectTypes.Media }; - var values = uow.Database.Fetch("SELECT id, uniqueId, nodeObjectType FROM umbracoNode WHERE nodeObjectType IN @types", new { types }); + var values = uow.Database.Query("SELECT id, uniqueId, nodeObjectType FROM umbracoNode WHERE nodeObjectType IN @types", new { types }); foreach (var value in values) { var umbracoObjectType = UmbracoObjectTypesExtensions.GetUmbracoObjectType(value.NodeObjectType); diff --git a/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs b/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs index 74f462e434..429e2a2f9e 100644 --- a/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs +++ b/src/Umbraco.Web/PublishedCache/ContextualPublishedCache.cs @@ -60,7 +60,7 @@ namespace Umbraco.Web.PublishedCache // same with Guid // cannot make this public nor abstract without breaking backward compatibility - protected virtual IPublishedContent GetById(bool preview, Guid contentKey) + public virtual IPublishedContent GetById(bool preview, Guid contentKey) { // original implementation - override in concrete classes var intId = UmbracoContext.Application.Services.EntityService.GetIdForKey(contentKey, UmbracoObjectTypes.Document); diff --git a/src/Umbraco.Web/PublishedCache/ContextualPublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/ContextualPublishedContentCache.cs index 5e687604f5..c927644817 100644 --- a/src/Umbraco.Web/PublishedCache/ContextualPublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/ContextualPublishedContentCache.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.PublishedCache : base(umbracoContext, cache) { } - protected override IPublishedContent GetById(bool preview, Guid contentKey) + public override IPublishedContent GetById(bool preview, Guid contentKey) { if (InnerCache is PublishedContentCache cc) return cc.GetById(UmbracoContext, preview, contentKey); diff --git a/src/Umbraco.Web/PublishedCache/ContextualPublishedMediaCache.cs b/src/Umbraco.Web/PublishedCache/ContextualPublishedMediaCache.cs index b8cfb8d4ae..0b4ccc18c4 100644 --- a/src/Umbraco.Web/PublishedCache/ContextualPublishedMediaCache.cs +++ b/src/Umbraco.Web/PublishedCache/ContextualPublishedMediaCache.cs @@ -21,7 +21,7 @@ namespace Umbraco.Web.PublishedCache : base(umbracoContext, cache) { } - protected override IPublishedContent GetById(bool preview, Guid contentKey) + public override IPublishedContent GetById(bool preview, Guid contentKey) { if (InnerCache is PublishedMediaCache cc) return cc.GetById(UmbracoContext, preview, contentKey); diff --git a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs index c073963754..59772e8237 100644 --- a/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs +++ b/src/Umbraco.Web/PublishedCache/XmlPublishedCache/PublishedContentCache.cs @@ -366,7 +366,7 @@ namespace Umbraco.Web.PublishedCache.XmlPublishedCache var xml = GetXml(umbracoContext, false); var nav = xml.CreateNavigator(); var iter = nav.SelectDescendants(XPathNodeType.Element, true); - _idkMap.Set(Enumerate(iter), UmbracoObjectTypes.Document); + _idkMap.Populate(Enumerate(iter), UmbracoObjectTypes.Document); } }