Skip to main content
Added more specific tags
Link
Mark Cassidy
  • 25.4k
  • 7
  • 59
  • 117
Source Link
Harsh Baid
  • 2.2k
  • 15
  • 42

Item Language Fallback doesn't work for Sitecore query

This is for Sitecore 7.5 update-2 version.

We are using Item-level Language Fallback and everything works fine except this piece gives error every time except when in Page Editor mode.

item.Axes.SelectSingleItem('ancestor::*[@@templateid='GUID']//*[@@templateid='GUID']')

Above code returns NULL object when trying to fetch item in language version which it doesn't exist. Since we have Item-level Language Fallback configured I'm unable to understand why this doesn't fallback when using Sitecore query.

Anyone has any idea on this appreciated or did you faced same issue anytime?