Hi,
I am having problem saving page content edited with the PageBuilder.
When I edit page content with a EditableArea, the changes don't get saved everytime.
Or this could be the after saving the editor doesn't reflects the updated content.
Kentico 13, hotfix 12, using MVC.
There is no error in the Event log.
Event log:
3/4/2021 11:02:15 AM Content UPDATEDOC administrator ::1 Home
This is my controller code.
//bool showLatest = HttpContext.Kentico().PageBuilder().EditMode || HttpContext.Kentico().Preview().Enabled;
TreeNode page = (TreeNode)pageRetriever.Retrieve<TreeNode>(query => query
.Path("/Home", PathTypeEnum.Single).LatestVersion(true))
.FirstOrDefault();
return View("Index", page);
This is the codes for my View.
@using Kentico.PageBuilder.Web.Mvc
@using Kentico.Web.Mvc
@model Kentico.Content.Web.Mvc.Routing.IPageViewModel<CMS.DocumentEngine.Types.TF.Home>
@{
ViewBag.Title = Model.Page.pagetitle;
}
@section styles
{
@* Includes CSS necessary for page builder functionality *@
@Html.Kentico().PageBuilderStyles()
}
@section scripts
{
@* Includes scripts necessary for page builder functionality *@
@Html.Kentico().PageBuilderScripts()
}
@{
var optionsDefaultSection = new EditableAreaOptions
{
DefaultSectionIdentifier = "TF.EmptySection"
};
}
@Html.Kentico().EditableArea("whoweareHTML", optionsDefaultSection)
I did get some JS error like
vendors.js:2 TypeError: Cannot read property 'sectionRestrictions' of undefined
vendors.js:2 TypeError: Cannot read property 'sections' of undefined
How should I resolve this?