Following the below steps, we see an issue in Sitecore v9.3.0 + Glass V5.6.160, compared to Sitecore v9.0.1 + Glass v22.214.171.124:
- Create a datasource item, version ONLY in EN culture. the fields has field level fallback enabled.
- For a page in EN culture, add component via SharedLayout and associate with datasource item above.
- For the selected page in #2, add version in a different language (NOT English culture).
- View the page on CMS for the language selected in #3 (NOT English culture), you will notice "the component shows on the CMS page, even though a version does not exist for the component."
In sitecore v9.0.1 + GlassV4, the component is shown in Experience Editor and NOT shown on CMS site.
In Sitecore v9.3.0 + GlassV5, the component is shown in Experience Editor and ALSO shown on CMS site.
- Note: we have the VersionCountDisabler customization as below
- Also, if I try to use the below customization, the component is NOT shown on both CMS page & Experience Editor, which is not correct. reference here
dependencyResolver.ObjectConstructionFactory.Replace<ItemVersionCountByRevisionTask, ItemVersionCountTask>(() => new ItemVersionCountTask());
EXPECTED: if a Language version does not exist, the component on SharedLayout shall NOT show on the CMS page. But shall show in the experience editor allowing content Authors to edit/create.
I have also tried (reference) setting the enforceVersionPresence=true on the site, and checking the Enforce Version on Datasource Item template. It does not produce the EXPECTED result.