0

While upgrading from Tridion 2011 to Web 8.5, I am unable to read TCMURI from webDAV. Due to which custom templates are failing (below is the code snippet from one of such templates). Any Idea about this issue?

string pubwedav = tbbContext.GetContextPublication().WebDavUrl.ToString();
itemWebDavOrTcmUri = pubwedav + itemWebDavOrTcmUri;
//Retrieve the TcmUri of the Tridion Item
var tridionItem = tbbContext.RetrieveItemAsObject(itemWebDavOrTcmUri);
TcmUri tcmUri = tridionItem != null ? tridionItem.Id : null;
2
  • While upgrading from Tridion 2011 to Web 8.5, unable to read TCMURI from web DAV. Due to which the custom templates are failing Commented Mar 12, 2020 at 17:52
  • How does the WebDAV URL look like? Is it like this - /webdav/010%20Schemas/Building%20Blocks/Content/New%20Component%201.xml. Are you using 8.5 DLLs and not 2011 DLLs? And are the DLLs x64 and not x86 if the server is x64? Please provide more information (tridion.stackexchange.com/help/how-to-ask.) Commented Mar 12, 2020 at 18:35

1 Answer 1

2

By simply looking at the code I have a gut feeling that the itemWebdavOrTcmUri is your issue, cause if it really can be an Item Webdav Url OR a TcmUri, you need to know which it is.

TcmUri.IsValidUri() should tell you if your variable, itemWEbDavOrTcmUri is a URI, in which case you can't append to the publication webdav url and expect the result to be a valid webdav url.

If it is indeed a webdav url, it probably already contains the publication portion of it, and for that matter, you shouldn't be appending it to the publication webdav url.

Your "question" (or lack of it) is very vague, so maybe adding some examples of the values of the variables or providing additional context on what you are trying to do, will allow "us" to help you out, with whatever issue you are having here...

Read the comments, and make sure you know "how to ask" questions in here.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.