1

Following the below steps, we see an issue in Sitecore v9.3.0 + Glass V5.6.160, compared to Sitecore v9.0.1 + Glass v4.5.0.4:

  1. Create a datasource item, version ONLY in EN culture. the fields has field level fallback enabled.
  2. For a page in EN culture, add component via SharedLayout and associate with datasource item above.
  3. For the selected page in #2, add version in a different language (NOT English culture).
  4. 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 dependencyResolver.ObjectConstructionFactory.Remove<ItemVersionCountByRevisionTask>();
  • 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.

1 Answer 1

0

To resolve the issue, I have enabled the following as referenced here

  1. Enable the enforceVersionPresence attribute on site definition.
  2. Enforce version presence on your template

Note: you may reset fields on you templates, when using a baseComponent template.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.