Thanks for your quick response!
Using the IContentService, we first perform a save action, followed by a publish. Publishing is optional in our business logic, but I can confirm that in this particular case, a publish is indeed being performed.
// Batched save
_contentService.Save(contents.Values);
foreach (var content in contents.Values)
{
PublishIfNeccessary(content);
}
Then the following action:
private void PublishIfNeccessary(IContent content)
{
// Try fetching published content
var publishedContent = _publishedContentCache.GetById(false, content.Key);
if (publishedContent == null)
{
// If not found, it means the content is currently unpublished, so keep it unpublished
return;
}
if (!ProductRoutingHelper.HasValidUrl(publishedContent))
{
return;
}
var publishResult = _contentService.Publish(content, ["*"]);
}
This can also be seen in the node’s history:
