Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited title
Link
Mark Cassidy
  • 25.4k
  • 7
  • 59
  • 117

GlassMapper 5.6.160: Component addedon SharedLayout without a version is displayed

Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
edited tags
Link
Mark Cassidy
  • 25.4k
  • 7
  • 59
  • 117
Source Link

GlassMapper 5.6.160: Component addedon SharedLayout without a version is displayed

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.