Skip to content
This repository was archived by the owner on Feb 10, 2024. It is now read-only.

Commit f5453db

Browse files
committed
Check for culture variation when picking content types
1 parent edd551e commit f5453db

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Our.Umbraco.DocTypeGridEditor/Web/Controllers/DocTypeGridEditorApiController.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
using Our.Umbraco.DocTypeGridEditor.Extensions;
1212
using Our.Umbraco.DocTypeGridEditor.Helpers;
1313
using Our.Umbraco.DocTypeGridEditor.Models;
14+
using Umbraco.Core;
1415
using Umbraco.Core.Models;
1516
using Umbraco.Core.Models.PublishedContent;
1617
using Umbraco.Core.Services;
@@ -60,7 +61,7 @@ public IEnumerable<object> GetContentTypes([ModelBinder] string[] allowedContent
6061
{
6162
var allContentTypes = Current.Services.ContentTypeService.GetAll().ToList();
6263
var contentTypes = allContentTypes
63-
.Where(x => x.IsElement)
64+
.Where(x => x.IsElement && x.VariesByCulture() == false)
6465
.Where(x => allowedContentTypes == null || allowedContentTypes.Length == 0 || allowedContentTypes.Any(y => Regex.IsMatch(x.Alias, y)))
6566
.OrderBy(x => x.Name)
6667
.ToList();

0 commit comments

Comments
 (0)