3

I have observed the Item XML of one folder does not have a proper Path or WebDAVURL.

I am using SDL Tridion 2011 SP1 version. This is happening the folder \02 My Templates\Building Blocks\System\Modules\myFolder

The Item XML for the folder is:

<tcm:Info>
    <tcm:LocationInfo>
        <tcm:WebDAVURL>/webdav/myFolder</tcm:WebDAVURL>
        <tcm:Path></tcm:Path>
    </tcm:LocationInfo>
    <tcm:BluePrintInfo>
        <tcm:OwningPublication xlink:type="simple"
                               xlink:title="02 My Templates" xlink:href="tcm:0-80-1" />
        <tcm:IsShared>false</tcm:IsShared>
        <tcm:IsLocalized>false</tcm:IsLocalized>
    </tcm:BluePrintInfo>
    <tcm:VersionInfo>
        <tcm:CreationDate>2012-04-26T09:49:27</tcm:CreationDate>
        <tcm:RevisionDate>2013-11-05T18:37:51</tcm:RevisionDate>
        <tcm:Creator xlink:type="simple" xlink:title="ABDC" xlink:href="tcm:0-14-65552" />
    </tcm:VersionInfo>
    <tcm:AllowedActions>
        <tcm:Actions Allow="269085696" Deny="96" Managed="10682" />
    </tcm:AllowedActions>
</tcm:Info>

Even the location field is empty. enter image description here

The code I used to return the XML shown above is:

var itemUri = "tcm:223-8700-2"; 
var item = $models.getItem(itemUri); 
if(item) { 
    if(item.isStaticLoaded()) {
        console.log(item.getStaticXml()); 
    } else {
        $evt.addEventHandler(item, "staticload", function() { 
            console.log(item.getStaticXml()); 
        }); 
        item.staticLoad(); 
    } 
}

Can anyone tell me what might be the cause here?

  • How did you get that XML? Is it Core Service by any chance? – Mihai Cădariu Nov 5 '13 at 17:59
  • I got xml by executing var itemUri = "tcm:223-8700-2"; var item = $models.getItem(itemUri); if(item) { if(item.isStaticLoaded()) { console.log(item.getStaticXml()); } else { $evt.addEventHandler(item, "staticload", function() { console.log(item.getStaticXml()); }); item.staticLoad(); } } – Patan Nov 5 '13 at 18:00
  • That's weird. Just check the same code, worked fine on 2011Sp1 w/ HR1. Tridion Version details? 2011 GA? or SP1 ? etc.. – Ram G Nov 5 '13 at 19:14
  • @RamG. Thank you for the response. I am using 2011 Sp1 version. Can we add path through some core service program. – Patan Nov 5 '13 at 20:36
  • 1
    @PeterKjaer. No. Even I checked this through core service program. Still I got same error. I resolved it by simply moving this folder from one location to another and again move it back – Patan Nov 6 '13 at 19:06
3

When you retrieve the path for a folder, Tridion looks this up in the path_mappings table in the database. Of course, it could construct the path every time by walking through the folder hierarchy, but this is less efficient. Of course, this means that the path_mappings table needs to be maintained every time a folder is changed, or moved, or localized, etc. There are a lot of places where this needs to happen, and occasionally there can be bugs. (Usually this involves some complex scenario like localize-rename-unlocalize or something like that. To be fair, such bugs are rare these days.)

The fact that moving the folder somewhere else and back fixes this probably means that this has triggered a re-calculation of the relevant records in the path_mappings table.

(The database contains stored procedures that update these mappings, and it can sometimes help to execute these manually, but please only do this after raising a support ticket and under the guidance/instruction of the support engineer. They know what can be safely done and what can't - in any case, you don't want to risk your support position.)

In general, you will be able to find a solution such as a rename or move, so database work is mostly not needed. If you can manage to reproduce the sequence of events that causes the situation in the first place, please also report this to support so that future versions of the product can work better. (Good luck there, though - all the simple scenarios have been found and fixed a long time ago.)

| improve this answer | |
  • Thanks for this insight. I think those those db inconsistenices are most likely to appear on somewhat older systems which have been through a couple of upgrades. – Jan H Nov 7 '13 at 10:47
  • This is not a problem that I'd expect to be caused by an upgrade. It is possible that data problems still remain even after the code that caused them is long since fixed, or are even caused by unsupported manipulation of the db. This particular issue would usually show itself when the system is in use though, so probably is of recent origin. – Dominic Cronin Nov 7 '13 at 10:57
2

I resolved this by simply moving the folder to another Dummy Folder and moved back.

I got the path back. Do not know the reason why it happened.

| improve this answer | |

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.