Try our conversational search powered by Generative AI!

Issue copying a catalog programatically on a live server.

Vote:
 

Hello, i have an issue copying a catalog(duplicatieing it) on our production server. I first copy the item in the main language and then acces it on the other languages and copy it as well. On my local server this works without any issues. On the production server i get : "the provided content link does not have a value" after the last line in the posted code. The value for amavitaNode.ContentLink is not null though. 

var newNode = contentRepository.GetDefault(parentNode, new LanguageSelector("fr"));
newNode.Name = node.Name;
newNode.Code = "Amavita____" + node.Code;
CopyData(node, newNode);
ContentReference nodeLink = contentRepository.Save(newNode, SaveAction.Publish, AccessLevel.NoAccess);


var sunstoreNode = contentRepository.Get(node.ContentLink, new LanguageSelector("de"));
var amavitaNode = contentRepository.Get(nodeLink, new LanguageSelector("de"));
amavitaNode = amavitaNode.CreateWritableClone() as LandingNodeContent;
amavitaNode.Language = new CultureInfo("de", true);
CopyData(sunstoreNode, amavitaNode);
contentRepository.Save(amavitaNode, SaveAction.Publish, AccessLevel.NoAccess);

#132323
Aug 13, 2015 11:03
Vote:
 

Hi,

Make sure your start page has been translated and published in fr and de.

Regards.

/Q

#132597
Aug 13, 2015 14:16
Vote:
 

everything is translated:

http://imgur.com/WZfSCxO

#132601
Aug 13, 2015 14:54
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.