Can’t add “pages” in DNN9?

If you are having problems adding Pages in DNN 9, read this blog post.

I recently upgraded all of my sites to DNN 9, the most recent one being upgraded last night. This morning I wake up to an email from a client of mine reporting a problem with adding pages in one of their sites that they also upgraded to DNN recently. I read through their email, and decide that I’ll look into their issue a bit later, have an itch to scratch on one of my own websites, so I’ll get to them later (sorry client).

Working on this site that I upgrade last night, I decided I wanted to add another page to the site, low and behold, I was unable to do so.

To add a page in DNN9 you click on the “Content” option in the persona bar, and then the Pages option. There you will be presented with a view similar to this:

image

When I clicked on Add Page there, the screen went blank, like so:

image

That’s not very useful, actually that is as far from useful as possible. Once that happens, you can’t actually “do” anything from an Admin perspective. You have to “leave” this page, go somewhere else (click on manage/users for example, then you might need to click BACK in your browser a bunch of times) then you can click on Content/Pages again to get back into the Page listing for a site.

So why is the persona bar page blank? This error is the cause:

GET https://SOMEPORTALALIASHERE/API/PersonaBar/Pages/GetDefaultSettings? 500 (Internal Server Error)

If you dig into the DNN Error Log (Admin Logs) a bit you might find a more detailed error, something along the lines of

Message:Value cannot be null. Parameter name: source

StackTrace:

at System.Linq.Enumerable.FirstOrDefault[TSource](IEnumerable`1 source, Func`2 predicate) at Dnn.PersonaBar.Pages.Components.TemplateController.GetDefaultTemplateId(IEnumerable`1 templates) at Dnn.PersonaBar.Pages.Components.PagesControllerImpl.GetDefaultSettings() at Dnn.PersonaBar.Pages.Services.PagesController.GetDefaultSettings() at lambda_method(Closure , Object , Object[] ) at

So what does that message tell you? Well something is happening with your DNN Install trying to get a list of “page templates”. In digging further, on my site, I found the issue to be the File Permissions on the Templates folder in the portals/0/ directory. For some reason on the site that I upgraded last night, my permissions were set to ALL USERS DENY on the “Browse Files in Folder” and “Open Files in Folder” check boxes.

image

Unchecking those, clicking SAVE resolved my “pages” persona bar issues. How did those permissions get set? Who knows, this DNN site has been around since 2008 or earlier, and that never caused a problem.

There are definitely some “kinks” to be worked out of DNN9, but so far I am digging the new experience.

Regarding my “client”’s site, they had a similar, but different issue. In their case, the TEMPLATES folder didn’t exist in the Portal that they were trying to use. Simply creating a new Templates folder in their File Manager fixed that problem for their site.

Recent Comments

Comment Avatar
Thanks Chris.
Posted By: erik h on Jan 2017
Comment Avatar

Thanks Chris! This just happened with a new site of mine and I thought I was losing it.

Posted By: Michael Snyder on Jan 2017
Comment Avatar
please disregard previous comment - - found the setting and after clicking save it started working again - thanks for the help, Allen
Posted By: allen Hunsucker on Feb 2017
Comment Avatar
Hi Chris - i'm suddenly having the same issue described in your post - and i'm new to DNN - would you mind telling me how to get to the "Templates folder Info" page? i can't seem to find it.. sorry for the newb question
Posted By: allen Hunsucker on Feb 2017
Comment Avatar

Thanks Chris. So relieved I found your solution!

Posted By: Jeff Frick on Aug 2017
Comment Avatar

This same situation was resolved for me by removing the unneeded Authentication Systems in the Extensions page.

Posted By: Mark Buelsing on Jun 2020

Add Comment

Please add your comment by filling out the field(s) below. Your comment may need to be approved before it becomes visible.
Enter your first name for display with the comment
Enter your last name for display with the comment.
Enter your comment here.
If you can't type DNNRocks in, you can't post, plain and simple.
Submit Comment Cancel

Chris Hammond

Chris Hammond is a father, husband, leader, software developer, photographer and car guy. Chris focuses on the latest in technology including artificial intelligence (AI) and has spent decades becoming an expert in ASP.NET and DotNetNuke (DNN) development. You will find a variety of posts relating to those topics here on the website. For more information check out the about Chris Hammond page.

Find me on Twitter, GitHub and LinkedIn.