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

Vote:
 

Hi,

 public class MyClass: NodeContent
    {
        [CultureSpecific]
        [Display(Name = "Title", GroupName = SystemTabNames.Content, Order = 1)]
        [Required]
        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.

#199174
Nov 19, 2018 12:40
Vote:
 

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

#199175
Nov 19, 2018 13:32
Vote:
 

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.

#199177
Nov 19, 2018 13:52
Vote:
 

Thanks for the reply.

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

contentRepository.Save(writableClone, SaveAction.ForceCurrentVersion | SaveAction.Publish);
#199185
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.