Closed jonatanjii closed 2 years ago
Hi @jonatanjii
Could you please verify? Fixed in 11.7.4.228? Added null check for content in SkipIndexing method. SkipIndexing is the only method calling IsFormUpload.
@otanum hi, a null check wont be enough since the variable content wont be null (already loaded into memory). It´s the call to "_contentAssetHelper.GetAssetOwner(content.ContentLink)" that is throwing a not found exception.
GetAssetOwner wont return null if content is not found, it will throw a not found exception so you need a try catch around this method call.
11.7.4.230
@otanum looks good!
https://github.com/Epinova/Epinova.Elasticsearch/blob/975972ea78ccf2a69578881035c006e68697dbe1/src/Epinova.ElasticSearch.Core.EPiServer/Indexer.cs#L313
This throws an exception if media doesn´t exist anymore (has been deleted after the indexing job was started) and it causes the entire indexing job to fail. Exception handling is needed to make sure the job continues indexing remaining media.
IContent owner = _contentAssetHelper.GetAssetOwner(content.ContentLink);