Upgrade from 11 to V13.0.3 with custom indexing issue
So the upgrade went smoothly up unto this point. On a production deploy to one of our instances we started having indexing issues which lead me to find thousands of errors in the logs. The code below though has worked since V8 but not in V13.0.3.
The errors were all very similar around key1 (culture) being null. The error is hit when trying to access the field Tags (IEnumerable
var basePageComp = (IBasePageComp)node;
tagsContent = basePageComp.Tags;
The error being:
System.ArgumentNullException: Value cannot be null. (Parameter 'key1')
at Umbraco.Cms.Core.Collections.CompositeStringStringKey..ctor(String key1, String key2)
at Umbraco.Cms.Infrastructure.PublishedCache.Property.CacheValues.For(String culture, String segment)
at Umbraco.Cms.Infrastructure.PublishedCache.Property.GetValue(String culture, String segment)
at Umbraco.Extensions.PublishedPropertyExtension.Value[T](IPublishedProperty property, IPublishedValueFallback
ublishedValueFallback, String culture, String segment, Fallback fallback, T defaultValue)
at Umbraco.Extensions.PublishedContentExtensions.Value[T](IPublishedContent content, IPublishedValueFallback
ublishedValueFallback, String alias, String culture, String segment, Fallback fallback, T defaultValue)
at ...Models.Generated.BasePageComp.GetTags(IBasePageComp that, IPublishedValueFallback publishedValueFallback) in
..\Models\Generated\BasePageComp.generated.cs:line 455
at ...Models.Generated.Home.get_Tags() in ...\Models\Generated\Home.generated.cs:line 223
at ...Components.Indexing.SearchContentIndexer.SetTagField(IndexingItemEventArgs e, IPublishedContent node) in
..\Components\Indexing\SearchContentIndexer.cs:line 352
Upgrade from 11 to V13.0.3 with custom indexing issue
So the upgrade went smoothly up unto this point. On a production deploy to one of our instances we started having indexing issues which lead me to find thousands of errors in the logs. The code below though has worked since V8 but not in V13.0.3. The errors were all very similar around
key1
(culture
) being null. The error is hit when trying to access the fieldTags
(IEnumerableThe error being:
Well this actually looks like an open bug:
IPublishedContent.HasValue() throws exception if segment is null 14954
is working on a reply...