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) on the second line.
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
This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/113569-upgrade-from-11-to-v1303-with-custom-indexing-issue