2

We have enabled language fallback and it's working great. Until i found this issue.

We have many languages en-gb, de-de,it-it etc and de-de is falling back to en-gb. We have a template called news and i have enabled item level fallback on the standard values of news template. So any news article will be in en-gb and de-de(fallback to en-gb).

How can we remove a particular news article in de-de but exists in all other languages. I tried creating new version for de-de and tried removing the version, Its falling back to en-gb.(Kind of make sense). This left with no option for content editors to not have version for particular news article in de-de.

Is there a way to do this?

  • In the Advance Section when you enable Standard Values, there is a checkbox called Enable Item Language fallback. Try to uncheck it on the specific item – Hishaam Namooya Apr 6 '17 at 11:27
  • 1
    Yes, i tried that already, that will remove fallback for all other languages ,which i don't want. – Dheeraj Palagiri Apr 6 '17 at 12:16
  • Maybe you will need t custom processor which checks if the item should fallback – Hishaam Namooya Apr 6 '17 at 13:11
1

Assuming you want the de-DE version to goto 404 page if no news for that language is present, Did you try "Enforce Version Presence - Hide this item if no language version exists [shared]"

Per definition from this post https://kb.sitecore.net/articles/350702

In a multi language solution, you can make sure that an item is only rendered on a specific language version of the website, if the item has a version in that particular language.

In Sitecore versions prior to 8.1, default behavior returned empty untranslated items if the requested item language version did not exist. This usually manifested in seeing a lot of '$name' macros or empty pages instead of a real content or Item Not Found page. Handling this properly required custom code.

Starting from Sitecore 8.1 there is an Enforce Version Presence feature configurable on the website and on the relevant item or template Standard Values level which allows to achieve the aforementioned behavior using the below configuration.

When you enable Enforce Version Presence for an item, an actual version of the item in the relevant language must be available for it (in other words, the item has to be translated) to be returned from the API and displayed on the website. If an item with no versions in the context language is requested by URL, Sitecore will redirect to the Item Not Found page if this feature is enabled.

By default, the Enforce Version Presence feature is disabled. You should enable the feature on the relevant websites and on the relevant items or template Standard Values.

Solution

Follow these steps to enable version presence enforcement on your Sitecore instance:

  1. Enable Enforce Version Presence on the desired sites(*) in Sitecore configuration(**). This change can be done within any custom include config file. <sites> <site name="website"> <patch:attribute name="enforceVersionPresence">true</patch:attribute> </site> </sites>

  2. Enable the feature on items and/or template Standard Values where you would like to see the feature enabled. The checkbox field that enables this feature is called Enable Enforce Version Presence and is placed under Advanced section. If you do not see the Advanced section, in the ribbon, on the View tab, enable Standard Fields. The value of this field gets inherited as any other field. This also means you can override this setting on items if needed.

  • I have already tried it and this not make any difference. – Dheeraj Palagiri Apr 10 '17 at 10:41
  • That's odd @DheerajPalagiri. Check your ShowConfig to make sure that the enforceVersionPresence attribute of your <site> definition is correct. When doing so, make sure that if your site is named something other than "website" your patch is being applied to all of the desired sites. – Zachary Kniebel Aug 4 '17 at 20:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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