Try our conversational search powered by Generative AI!

Custom catalog property not getting updated for other than master language.



 public class MyClass: NodeContent
        [Display(Name = "Title", GroupName = SystemTabNames.Content, Order = 1)]
        public virtual string Title { get; set; }

we have a culture-specific property which on published using API, gets published but the value is not visible for a language other than master language(English)in Episerver. But the value has been updated in DB. Kindly help me to fix this.

Thanks in advance.

Nov 19, 2018 12:40

How do you publish the content? Does the value appear if your IISRESET?

Nov 19, 2018 13:32

Thanks for the reply.

Below my code used to publish.

var category = contentRepository.GetChildren<MyClass>(parentLink, CultureInfo.GetCultureInfo(model.LanguageCode))
                              .FirstOrDefault(x => string.Equals(x.Name, model.LanguageCode == "en" ? model.Name : model.EnglishName, StringComparison.OrdinalIgnoreCase));
var writableClone = category.CreateWritableClone<MyClass>();
writableClone .Title = somevalue;
contentRepository.Save(writableClone, SaveAction.Publish);

A title is visible on a website. But not in Episerver back end. It asks for publishing.

Nov 19, 2018 13:52

Thanks for the reply.

Our requirement is to publish existing content. Not a new below save method worked for us.

contentRepository.Save(writableClone, SaveAction.ForceCurrentVersion | SaveAction.Publish);
Nov 19, 2018 16:41
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.