I have a function that localizes a Component (if needed) before updating its content. I'm randomly getting errors when, after this call, I try to update the content, getting a 'It is not possible to check-out a shared item' error. Taking a look at the logs, I see that component was not localized. The only reason is because this item.BluePrintInfo.IsLocalized
is lying.
Here my code...
```
ComponentData item = (ComponentData)client.Read(tridionItemUri.ToString(), new ReadOptions());
if (!(bool)item.BluePrintInfo.IsLocalized)
{
client.Localize(tridionItemUri.ToString(), new ReadOptions());
Logger.Info(new TridionItemLog() { Message = "Component localized", Tcm = tridionItemUri.ToString() }.ToString());
}
```
If I go to SDL Web and manually localize the Component, then I can update with no problem.
So my question is. Could this BluePrintInfo
be cached or not realtime info? Should I use another way to check whether my Component is localized?
Thanks in advance.
BTW: It's SDL Web 8.5 SP1
IsLocalized
could give different answers each time?