Allow indexing variant nodes when not all variants are published - fixes issues 11383. (#12669)

* This fixes issues 11383.
The introduction of the new Examine library caused an unintended consequence that it stopped indexing of nodes with language variants on them when one of the variants was unpublished.

These changes align ValueSetValidationStatus.Filtered to indicate that a node is intended as filtered out of a search, not that parts of its contents had been excluded from the result.

This brings it inline with how it is used in Umbraco.Examine.Lucene/UmbracoContentIndex

Unit tests changed to indicate the intent of ValueSetValidationStatus.Filtered

Change to UmbracoViewPage to make model variable nullable (because the solution wouldn't build otherwise on 2022)

* revert to use explicit type instead of var

Co-authored-by: Nathan Woulfe <nathan@nathanw.com.au>
Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
Jonny Muir
2022-12-06 07:17:58 +00:00
committed by Bjarke Berg
parent e992da7159
commit 248a0c4f19
4 changed files with 33 additions and 21 deletions

View File

@@ -41,7 +41,7 @@ public abstract class UmbracoViewPage<TModel> : RazorPage<TModel>
_helper = Context.RequestServices.GetRequiredService<UmbracoHelper>();
TModel model = ViewData.Model;
TModel? model = ViewData.Model;
var content = model as IPublishedContent;
if (content is null && model is IContentModel contentModel)