From 1f50858ce531e2a0e02431077ba52e258e8ef7b4 Mon Sep 17 00:00:00 2001 From: vc-ci Date: Mon, 23 Oct 2023 11:46:53 +0000 Subject: [PATCH 1/2] 6.33.0 --- Directory.Build.props | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Directory.Build.props b/Directory.Build.props index 0003531c..0dfe7a14 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -7,7 +7,7 @@ VirtoCommerce - 6.32.0 + 6.33.0 $(VersionSuffix)-$(BuildNumber) From aa849a98891191892c038fa84416cbc270fc7e13 Mon Sep 17 00:00:00 2001 From: Basil Kotov Date: Mon, 30 Oct 2023 07:36:20 +0100 Subject: [PATCH 2/2] PT-13653: ignore ContentFIle object from platform response (#660) fix: ignore ContentFIle object from platform response (#660) --- .../Controllers/Api/ApiCommonController.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/VirtoCommerce.Storefront/Controllers/Api/ApiCommonController.cs b/VirtoCommerce.Storefront/Controllers/Api/ApiCommonController.cs index e615bd46..03485635 100644 --- a/VirtoCommerce.Storefront/Controllers/Api/ApiCommonController.cs +++ b/VirtoCommerce.Storefront/Controllers/Api/ApiCommonController.cs @@ -63,7 +63,7 @@ public async Task Feedback([FromBody] ContactForm model) return Ok(); } - + [HttpPost("slug")] public async Task GetSlugInfoBySlugAsync([FromBody] SlugInfoRequest slugInfoRequest) { @@ -102,7 +102,7 @@ private async Task GetSlugInfoAsync(string slug, string culture) var bestSeoInfo = seoInfos.FirstOrDefault(); result.EntityInfo = bestSeoInfo; - if (result.EntityInfo == null) + if (result.EntityInfo == null || result.EntityInfo.ObjectType == "ContentFile") { var pageUrl = slug == "__index__home__page__" ? "/" : $"/{slug}"; try @@ -110,7 +110,7 @@ private async Task GetSlugInfoAsync(string slug, string culture) var pages = WorkContext.Pages.Where(p => string.Equals(p.Url, pageUrl, StringComparison.OrdinalIgnoreCase) || string.Equals(p.Url, slug, StringComparison.OrdinalIgnoreCase) - ); + ).ToList(); var page = pages.FirstOrDefault(x => x.Language.CultureName.EqualsInvariant(culture)) ?? pages.FirstOrDefault(x => x.Language.IsInvariant)