An error occurred while attempting to retrieve page templates. Contact your system administrator and

Jeewani Jayasuriya asked on April 30, 2025 16:12

I am getting below error when I am trying to add a new page which I have created under Page Types. I am using Kentico 13.

Recent Answers


John Lougee answered on April 30, 2025 21:41

Hi Jeewani, It looks like your error did not come through with your message. Can you try posting it here again? You should be able to just copy and paste the whole error here or take a screenshot of the full details and post that.

0 votesVote for this answer Mark as a Correct answer

Jeewani Jayasuriya answered on May 1, 2025 11:13

Hi John,

Thank you for letting me know.

Below is the error I am getting.

An error occurred while attempting to retrieve page templates. Contact your system administrator and check that the page builder feature is registered correctly in the MVC project.

Thank you.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on May 5, 2025 07:26

Are there any errors in the Event log? How did you created and registered the page template? IF you created the page before the page template or changed the template, you may need to delete the page and re-create it again.

0 votesVote for this answer Mark as a Correct answer

Rahul Kumawat answered on May 6, 2025 18:36 (last edited on May 6, 2025 18:38)

Checklist to Resolve the Issue in Kentico Xperience 13 (ASP.NET Core)

1. Register the Page Builder Middleware

Ensure you have this in your Startup.cs:

app.UseKentico();
app.UseStaticFiles();
app.UseRouting();

app.UseAuthorization();

app.UseEndpoints(endpoints =>
{
    endpoints.MapControllerRoute("default", "{controller=Home}/{action=Index}/{id?}");
    endpoints.MapRazorPages();
});

// Must be after UseRouting and before UseEndpoints
app.UsePageBuilder();

2. Enable Page Builder in Startup.cs

Also in ConfigureServices:

services.AddPageBuilder();

3. Register Page Templates

If you're using page templates (e.g., in App_Start or module registration):
[assembly: RegisterPageTemplate("Template.Identifier", "Template Display Name",  typeof(YourTemplatePropertiesModel), "~/Views/PageTemplates/YourTemplate.cshtml")]

4. Check for Missing Permissions or Roles

Ensure your user has the necessary roles/permissions to create/edit pages using templates.

5. Verify the Template Exists

Make sure the physical .cshtml file exists at the path specified in the page template registration.

6. Ensure Page Builder Feature is Enabled in Kentico Admin

Go to Modules > Page Builder and confirm the feature is installed and enabled.

7. Rebuild and Restart

After adding all necessary configurations, rebuild the solution and restart the site.

8. 🔥 Most Important: Run the Live Site

Kentico Xperience only fully initializes Page Builder templates after the live site has been visited at least once.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.