Umbraco-CMS: Cannot rebuild Examine Index

Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)

11.3.0

Bug summary

Hi! Today, I updated my Umbraco 11 site to Umbraco 11.3 and discovered that my web search functionality is no longer producing any results. Typically, when faced with this type of issue, I attempt to rebuild the indexes. However, I’m unable to do so due to the following error message:

The process is taking longer than expected, check the Umbraco log to see if there have been any errors during this operation

I tried rebuilding the Internal, External, and two custom indexes, but none of them seem to work.

Error message: Error occurred executing "workItem". and a stack trace:

System.NotSupportedException: Variation "de,<null>" is not supported by the property type.
   at Umbraco.Cms.Core.Models.Property.SetValue(Object value, String culture, String segment)
   at Umbraco.Cms.Core.PropertyEditors.NestedPropertyIndexValueFactoryBase`2.GetNestedResults(String keyPrefix, String culture, String segment, Boolean published, IDictionary`2 propertyTypeDictionary, TItem nestedContentRowValue)+MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at Umbraco.Cms.Core.PropertyEditors.NestedPropertyIndexValueFactoryBase`2.Handle(TSerialized deserializedPropertyValue, IProperty property, String culture, String segment, Boolean published)
   at Umbraco.Cms.Core.PropertyEditors.JsonPropertyIndexValueFactoryBase`1.GetIndexValues(IProperty property, String culture, String segment, Boolean published)
   at Umbraco.Cms.Infrastructure.Examine.BaseValueSetBuilder`1.AddPropertyValue(IProperty property, String culture, String segment, IDictionary`2 values)
   at Umbraco.Cms.Infrastructure.Examine.ContentValueSetBuilder.GetValueSetsEnumerable(IContent[] content, Dictionary`2 creatorIds, Dictionary`2 writerIds)+MoveNext()
   at System.Collections.Generic.LargeArrayBuilder`1.AddRange(IEnumerable`1 items)
   at System.Collections.Generic.EnumerableHelpers.ToArray[T](IEnumerable`1 source)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.IndexPublishedContent(Int32 contentParentId, Int32 pageIndex, Int32 pageSize, IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.ContentIndexPopulator.PopulateIndexes(IReadOnlyList`1 indexes)
   at Umbraco.Cms.Infrastructure.Examine.IndexPopulator.Populate(IIndex[] indexes)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.RebuildIndex(String indexName, TimeSpan delay, CancellationToken cancellationToken)
   at Umbraco.Cms.Infrastructure.Examine.ExamineIndexRebuilder.<>c__DisplayClass9_1.<RebuildIndex>b__1()
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
   at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
   at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of stack trace from previous location ---
   at Umbraco.Cms.Infrastructure.HostedServices.QueuedHostedService.BackgroundProcessing(CancellationToken stoppingToken)

Specifics

No response

Steps to reproduce

Upgrade Umbraco 11 to 11.3

Expected result / actual result

No response


This item has been added to our backlog AB#28491

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 20 (11 by maintainers)

Most upvoted comments

Just to add we’ve released patches for 10 and 11 with this fix that is now live on nuget 😄

@kjac I also ran into this issue in 10.5 yesterday. This error looks similar to something we encountered at some point in our package (Perplex.ContentBlocks) and the fix was to properly set the .Variations property on the IPropertyType, perhaps this is something you guys need to do as well so I thought I’ll drop the snippet here (taken from here):

if (culture != null) propType.Variations |= ContentVariation.Culture;
if (segment != null) propType.Variations |= ContentVariation.Segment;

You may have to adjust the way you build the propertyTypeDictionary here and perhaps do something like this (untested code):

var propertyTypeDictionary =
    contentType
        .PropertyGroups
        .SelectMany(x => x.PropertyTypes!)
        .Select(propType => 
        {
            // Ensure the requested variation is allowed on the property type
            if (culture != null) propType.Variations |= ContentVariation.Culture;
            if (segment != null) propType.Variations |= ContentVariation.Segment;
            
            return propType;
        })
        .ToDictionary(x => x.Alias);

Again, no idea if this is the actual fix or if it something completely different but this information may be of use so I thought I’d share.

Hi @argentini,

Thank you for reporting. It confirms our initial analysis that this does indeed “only” affect multi-lingual setups.

We’re planning a patch release to fix this in the coming weeks. For now the code in this comment should revert your site back to pre-11.3 Examine behavior.

Thanks a lot @PerplexDaniel … every bit of input helps. We have pinpointed the (suspected) root cause, now we “just” need to fix and test and test some more 😆

I have this issue as well, and I also see this exception when I save and publish a content item that has a block list property with one or more blocks in it. If the block list property is empty it does not throw. This only happens in a multi-lingual site.

No worries! We actually use both, slowly migrating to BlockGrids. thanks again for the quick reply 😃