I have error pages that are using custom routing rather than content tree-based routing. These error page has page builder enabled. Having editable areas on this page that has a custom route is causing the following error:
Missing web page context data. If required use IWebPageDataContextInitializer.Initialize method to initialize the context manually. For POST actions use HtmlHelper extension method Html.Kentico().PageData() to persist the page context.
I have tried adding page data context by adding the following code to the controller, but this did not fix the issue.
var pageDataContext = webPageDataContextRetriever.Retrieve().WebPage;
webPageDataContextInitializer.Initialize(pageDataContext);
Has anyone else ran into this issue? Any help would be much appreciated!
Environment
- Xperience by Kentico version: [29.1.0]
- .NET version: [8]
- Deployment environment: [SaaS|Azure|VM]