Hello,
I’ve migrated a v13 to v17 using uSync.Migrations. This includes conversion from Grid to BlockGrid. After the migration, everything in the backoffice looks good. However the column layout in the frontend doesn’t reflect the backoffice.
4-column layout (backoffice - good)
4-column layout (frontend - bad)
When I save and publish this content in the backoffice, it fixes itself:
4-column layout (frontend - good)
Since I have over 500+ pages, I don’t want to manually save each content. Therefore I tried using IContentService to do it programmatically.
Test with single content item:
var content = _contentService.GetById(Guid.Parse("0a76c794-81d8-4d38-ad5a-827598412fdc"));
var c = _contentService.Save(content);
var r = _contentService.Publish(content, content.AvailableCultures.ToArray());
Test with all content items (missing save, but don’t know how to add it, without going through each content separately):
var rootNodes = _contentService.GetRootContent();
foreach (var node in rootNodes)
{
var result = _contentService.PublishBranch(node, PublishBranchFilter.ForceRepublish, node.AvailableCultures.ToArray());
}
Neither of these seem to do anything. After these actions, I’ve tried clearing Memory Cache, Database Cache, Rebuilding Indexes, clearing Cache programmatically. Nothing worked.
After trying to save/publish the content with the IContentService, I still receive the “discard unsaved changes” dialog:
This dialog does not appear, when I manually save/publish in the backoffice.
How do I achieve the same result as the manual save/publish in the backoffice, but instead programmatically for every single content item that exists?
Best regards,
Jeremy



