Archive Page 2

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!

27
Jan

Obama’s Inauguration panorama shot

Hey guys,

one interesting link.. 220 single photos, 1474 mega pixel, resolution 59.783 x24.658 pixel …

Click here:duggback.com

I really like looking for the cia guys ;-) have fun.. cheers chris

06
Jan

Sitecore MVP - Most Valueable Professionals 2008

Hey guys,

finally somebody really reads the posts I write and Sitecore nominated me for the MVP award 2008. After weeks of votings I really got an award! :-) Hope the topics I wrote about are interesting and helpful. Now I get access to much more information I can share ;-)

Thanks to all who voted for me and of course also who nominated me.

San Francisco, January 6, 2009 – Sitecore, the leading provider of .NET Web Content Management System (CMS) software, today announced the Sitecore MVP Program. This program recognizes exceptional technical community leaders who foster free and objective exchange of knowledge by actively sharing their real-world expertise with technology users. For 2008, thirteen outstanding individuals from around the world were selected to be members of the program and honored with a Sitecore Most Valuable (MVP) Award.

The MVP award also goes to:

Australia
• Alistair Deneys (Next Digital Group)

Canada
• Eric Briand (Ergonet)
• Glen McInnis (Non-linear Creations)

Germany
• Julius Ganns (netzkern GmbH)

Denmark
• Klaus Petersen (Alpha Solutions A/S)
• Thomas Eldblom (Pentia A/S)

The Netherlands
• Justin Sjouw (Caesar Optimit)
• Marc van Aalst (Evident)

UK
• Mark Cassidy (Corepoint-IT)

USA
• Andy Uzick (FMC Technologies, Inc.)
• Sasha Pfandt (Digitaria Interactive, Inc.)
• Ben Golden (Aware Web Solutions)

Read the full press release by Sitecore here: http://www.sitecore.net/en/News/Press%20releases/2009/Sitecore%20MVP%20Program%202008.aspx?nav=s

cheers chris

14
Dec

“I’ve got the balls, dude!”

Hey,

if you are asking yourself, what we are doing at one of our famous christmas parties, … of course we are working with Sitecore.

Check out our new video, by Markus ‘da bomb’ Green and myself…



Enjoy your christmas eve… and merry christmas

cheers chris

12
Dec

Create application links in the sitecore startmenu (don’t work)

Hey guys,

in my current project I have created a very simple Sitecore client application to manage newsletter (I will write a documentation how to work with xaml hopefully soon.). After the whole application work I want to link this app in the Sitecore start menu for every user.

If you want to do this, you have to:

  • Go to the core database
  • Open: /sitecore/content/Documents and settings/All users/Start menu/Left
  • Create a “Application shortcut”
  • Fill the fields: Display name, Tool tip and apply security rights (if you want to enable this link just for groups or user)

Now the tricky part: The “Application” field:

  • Click on Insert Link
  • Select your desired app
  • Click “OK”

So far, everything is fine. If your link don’t show up. Go to the view ribbon, click on “Raw values” and go to the application field.

Change this:

<link text="Demo App" linktype="internal" url="/Applications/Demo App.aspx" id="{007BA8C3-3C1D-4569-90B1-DC7F0A0A4689}" />

To:

<link text="Demo App" linktype="internal" url="/Applications/Demo App" />

So remove the “.aspx” and the id parameter, and save. After this change and a reload of the client your link should show up in the start menu.

cheers chris

30
Oct

Share this! - The 5 Paths to Web 2.0 Profit

Hey guys,

after I saw this Webinar, I applied the advices by Darren in my own blog with using the new “Share this” button at the top of each post.

By the way, Sitecore is always doing a good job by creating such Webinars. Everybody can attend and you get a lot of advices or experience - and it’s related to Sitecore (of course).
Well, in my case my blog is powered by wordpress, but you see that you can apply the essence of a webinar pretty much to every application.

So go to http://www.sitecore.net/News/Webinars.aspx?nav=s, register and enjoy ;-)

cheers chris

28
Oct

sitecore website login / restrict sites for anonymous *update*

Hey guys,

if you are trying to restrict special sites for the extranet\anonymous user, so only authenticated users (doesn’t matter if it’s a virtual user or a real user account) can view that content.

You can restrict the read right for the anonymous user and add an (undocumentated - the reason I write about it ;-) ) attribute to your site in the web.config. The default one will be website I think.

loginPage=/sitecore/content/home/Registration/Login.aspx

It can also be a sitecore Item and you refer to the virtual path. So after Sitecore sees that the user is not autenticated, it redirects the user to your login page. Unfortunately it passes own query string parameters, and none of them is “returnUrl”. In my case I hooked into the httpRequest pipeline right before the ExecuteRequest processor and created my own SecurityResolver.

[updated]

    public class SecurityResolver : HttpRequestProcessor 
    {     
 
        public override void Process(HttpRequestArgs args) 
        { 
            // Get the site context 
            // [CW] 
            SiteContext site = Sitecore.Context.Site;          
 
            // Check if the current user has sufficient rights to enter this page 
            // [CW] 
            if (SiteManager.CanEnter(site.Name, Sitecore.Context.User)) 
            { 
                string prefix = args.StartPath;          
 
                if(args.LocalPath.Contains("/sitecore/content/home")) 
                    prefix = String.Empty;          
 
                if (Sitecore.Context.Database != null) 
                { 
                    Database contextDatabase = Sitecore.Context.Database;          
 
                    Item contextItem = null;          
 
                    // Get the item using securityDisabler for restricted items 
                    // [CW] 
                    using (new SecurityDisabler()) 
                    { 
                        contextItem = contextDatabase.SelectSingleItem(String.Concat(prefix, args.LocalPath)); 
                    }          
 
                    // Check if a loginPage is given 
                    // (Should be for this website) 
                    // [CW] 
                    if ((contextItem != null) &amp;&amp; (contextItem.Access.CanRead() == false) &amp;&amp; (site != null) &amp;&amp; (site.LoginPage.Length &gt; 0)) 
                    { 
                        // Redirect the user 
                        // [CW] 
                        WebUtil.Redirect(String.Format("{0}?returnUrl={1}", 
                            site.LoginPage, 
                            HttpContext.Current.Server.HtmlEncode(HttpContext.Current.Request.RawUrl))); 
                    } 
                } 
            } 
        } 
    }

Hope it’s helpful for you - You may also post questions or interests. I’m looking forward to develop a sitecore client application with xaml, and can manage to documentate the steps I do.

cheers chris





September 2010
M T W T F S S
« Mar    
 12345
6789101112
13141516171819
20212223242526
27282930  

Recent Entries

netzkern GmbH
View Christopher Wojciech Sitecore Developer