Archive for February, 2009

17
Feb

Language embedding in urls

Hey there,

Sitecore 6 provides a functionality to embed your language as parts in the url e.g. http://www.test.com/en-US/test.aspx.

You can control this feature by using the web.config entries:

<linkManager defaultProvider=”sitecore”>
   <providers>
    <clear/>
    <add name=”sitecore” type=”Sitecore.Links.LinkProvider, Sitecore.Kernel” addAspxExtension=”true” alwaysIncludeServerUrl=”false” encodeNames=”true” languageEmbedding=”asNeeded” languageLocation=”filePath” shortenUrls=”true” useDisplayName=”false”/>
   </providers>
  </linkManager>

Cheers chris

13
Feb

Breaking xslt paradigm

Hey guys,

writing xslt is some kind of special, isn’t it? As a original developer who started with php need to pay special attention to the xslt paradigm.

In my case I have a dropdown navigation with two columns after each 4 items where you need to split the current div tag into a new.

You can’t do something like this:

<xsl:if test=”position () = 4″>
</div><div class=”Submenu”>
</xsl:if>

Right?

The solution is some kind of “hack”, so only use this if you have tried to think over your code and another solution.

<xsl:variable name=”divider”>
  <![CDATA[</div><div class=”Column”>]]>
</xsl:variable>

Now you can do:

<xsl:if test=”(position() mod 4) = 0″>
  <xsl:value-of select=”$divider” disable-output-escaping=”yes”/>
</xsl:if>

Enjoy ;)

10
Feb

Sitecore query in template source fields + language

Hey guys,

if you have:

  • A template with a dropdown (or droplink field)
  • A second template with a checkbox field

You want to have: An item based on the first template with a dropdown where only items are displayed which have the checkbox checked.

My source is:

query:/sitecore/content/home/Site/#Ueber-Uns#/Team/*[@is contact=’1′]

First you have to keep in mind that item names with “-” dashes should be covered by “#” else you get the exception: Invalid lookup source …

Second (if you operate with a second language - here: german): If you don’t get any results, mark the checkbox as shared. In some way the query doesn’t select the correct language from my point of view.

cheers chris

10
Feb

Sitecore released Sitecore 6.0.0 rev.090120

Hey guys,

just a short note: Sitecore has a new recommended version of Sitecore 6 (Sitecore 6.0.0 rev.090120). I will update all of our Sitecore webs as soon as possible.

Enjoy! :-) cheers chris

Sitecore Download Section

03
Feb

Versions are duplicated and have the same version number **update**

Hey guys,

at the moment I’m facing a really strange and annoying issue using versions in Sitecore 6.

Version numbersIf you want to add a second version to an item, how do you do this? You go to the version tab and click “Add”, right? Yes! (Of course there are other ways,….) Unfortunately you get more than you want to have. In my case you have a new version called “2? - but two times (!). Check the screenshot.

If you look into the database directly by using a select statement:

SELECT * FROM dbo.VersionedFields

You will get the hint that the two version don’t have the same values in every field. The language field says “de-de” for a couple of items and de-DE for other ones.

After creating a support case at the official Sitecore Support we got the solution by converting the different values to the same by using the sql statement:

UPDATE dbo.VersionedFields
SET Language=’de-DE’
WHERE Language=’de-de’ COLLATE Latin1_General_BIN

… a couple of days later ….

We have the same issue again! Annoying!

The facts:

  • It cannot be a displaying bug, because:
    • I directly triggered the sqlDataApi to get the versions => 3 versions / 2 version numbers
    • I checked the sql table directly and got the versions
  • I switched the Sitecore Installation to a new and clean installation and just connected the corrupted databases => Same issue
  • I disabled the Cache.GetVersions() method (by stepping directly in it) => same result.
  • I created a new version programatically and have the same result

After the Sitecore Support searched my web.config, they pointed me to my sites config and that the language parameter got the value “de-de” (it has to be “de-DE”), but this cannot be as well. We have been working with that Config from the beginning (approx. Aug 08), but we first experienced this in Dec 08.

So, what did we changed? At the moment I’m not looking at software updates (not yet!) - I remembered that we set up the PublishAgent in the web.config with that configuration:

<agent type=”Sitecore.Tasks.PublishAgent” method=”Run” interval=”02:00:00″>
 <param desc=”source database”>master</param>
 <param desc=”target database”>web</param>
 <param desc=”mode (full or incremental)”>incremental</param>
 <param desc=”languages”>de-de</param>
</agent>

Could that corrupt our database? I’m not sure, because after solving the problem by using the sql update statement and changing the auto publish to 2 minutes I cannot reproduce this issue locally.

Okay guys, if any one have some hints just give me a buzz. I’m still trying to reproduce and solve it forever!

cheers chris

The Solution:

The Sitecore Support guys are the best and really fast… The solution is that simple I have never thought about. My web.config have the values de-de instead of de-DE! You can reproduce this by creating an item and change the publish restrictions. If you have the correct values in your web.config you can’t reproduce this behaviour. That simple!

So, please set your web.config language values to the same you have in your sitecore/system/language tree! Case-sensitive!

(The Support also registered this as a bug for the current version.)

Thanks to the support at this point!




February 2009
M T W T F S S
« Jan   Apr »
 1
2345678
9101112131415
16171819202122
232425262728  

Recent Entries