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)
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)