As I can’t post code I’m asking this as a theoretical question, but giving a scenario.
I have a “newsroom” sublayout, which staticaly binds a couple of XSLTs to list latest news and latest events. The sublayout is used on a newsroom item, the events and news items are descendants of it (though not direct child items, there are a couple of layers of folders to categorise and date items).
The subayout is in use in around 10 sites in our solution with no problem. Each site is a clone of our main site with an extra language version added. We hae succesfully used this with (amongst others) Japanese, Chinese, Russian, Polish and Czech language sites.
Our most recent clone (Turkish), however, shows no items in the event or news lists. The items exist and are published, and display as expected when browsed individually.
The presentation details for the newsroom item are identical to all other newsroom items.
Even more perplexing, the newsoom item itself, when displayed in the context of a different domain, displays correctly.
i.e.
www.mysite.com/sitecore/content/my_turkish_site/path/newsroom?sc_lang=tr-TR
shows the lists without a problem, including dates formatted according to culture, but
www.mysite.com.tr/sitecore/content/my_turkish_site/path/newsroom?sc_lang=tr-TR
shows empty lists.
The exact same problem occurs if language is switched to English (the language of the source of the clone)
Almost all of the Turkish site is working properly.
None of the presentation components are marked as cachable.
None of the presentation components have a specified data source (i.e. they all use the current item/descendants axis)
What are the possible causes of this problem, and how can I test them?
EDIT:
For Mark Ursino
This is the site definition (slightly fictionalised). I can’t post that much more of the web.config…
<site name="www.mysite.com.tr" patch:after="site[@name='www.mysite.com.au']" virtualFolder="/" physicalFolder="/" rootPath="/sitecore/content/CloneData/TurkishClone" hostName="www.mysite.com.tr" startItem="/Turkey_Home" database="web" domain="extranet" allowDebug="true" cacheHtml="true" htmlCacheSize="10MB" enablePreview="true" enableWebEdit="true" enableDebugger="true" disableClientData="false" language="tr-TR" />
Some debugging shows that the XSLTs aren’t matching the template when the item is viewed in the Turkish context.
This is the debug match used (the select is what we use in our for-each):
<xsl:value-of select="count(./descendant::item[@template='newsitem' and @id!=$topNewsId and sc:fld('__created',.)])"/>
It matches on the same item viewed from other domains.
Debug output shows the Turkish site thinks the template is newsıtem instead of newsitem (the i is wrong!).
I’ve also tested viewing the newsroom of other sites through the Turkish domain – the problem is the same.
We have the same problem with items based on the eventitem template, and apparently with an Image Spot template.
Answering my own question.
Sitecore template names are converted to lower case for use in XSLT comparison, by the Sitecore XSLT extensions.
This lower case conversion hasn’t been set as culturally invariant. In Turkish, forcing lower casing of a upper case
Igives the lower caseıSitecore has replaced calls with
ToLower()in the Sitecore API withToLowerInvariant()as of 6.5 rev.110419http://sdn.sitecore.net/Products/Sitecore%20V5/Sitecore%20CMS%206/ReleaseNotes/ChangeLog.aspx
As we’re not upgrading to 6.5 quite yet we’ll be using template IDs rather than names in XSLT for now.
.Net info on strings and culture, including specifically the “Turkish I problem”
http://msdn.microsoft.com/en-us/library/ms973919.aspx