Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Error when changing Site SettingsError when changing Site Settings
Previous
 
Next
New Post
4/30/2014 9:20 PM
 

Hi.  I have a DNN 7.2.1 site that gives the following error whenever I make a change within Site Settings, and I click "Update":

Error: Site Settings is currently unavailable.DotNetNuke.Services.Exceptions.ModuleLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DesktopModules.Admin.Portals.SiteSettings.UpdatePortal(Object sender, EventArgs e) in C:\DNN\DesktopModules\Admin\Portals\SiteSettings.ascx.cs:line 1155 --- End of inner exception stack trace ---


The line of code that is being referenced is as follows:
var portal = new PortalInfo


I don't know if this has any bearing on the issue, but the site went through a couple of upgrades earlier this year:
5.6.8 -> 6.2.8 -> 7.0.6 -> 7.1.2 -> 7.2.1


I can generate the error by trying to change a setting on the "Basic Settings" such as the "Edit Skin".  I can also generate the error when I change a setting on the "Advanced Settings" tab such as "Enable Pop-Ups".  The error occurs when I click "Update", and the changes are never saved.

Does any one have any suggestions?  Thanks!

See Ya!
Van
P.S.  My "work around" is to hit the PortalSettings table directly via an update statement to make the change like so:

UPDATE DB.dbo.PortalSettings SET SettingValue = '[G]Skins/Skin1/Skin1.ascx' WHERE (SettingName = 'DefaultAdminSkin') AND (PortalID = 0)


See Ya! Van
 
New Post
5/1/2014 4:31 AM
 
please make sure, each SettingName is appearing only once per Portal in table PortalSettings.

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
5/1/2014 9:23 AM
 

Sebastian:

Thanks for the great suggestion!  I checked it out this morning.  Unfortunately, I didn't find any duplicate records.

I checked my work log, and I had successfully updated the Site Settings back on 4/7/14.  All of the DNN upgrades occurred back in February and March, so Site Settings was definitely working after I had upgraded the site to DNN 7.2.1.  Therefore, I don't think that this issue is related to the site being upgraded.  I'm mentioning this because I see a lot of posts about similar errors that occurred after a particular site was upgraded.

Something has changed in this DNN installation in the past 3 weeks that is causing this issue.  I'll keep digging around.  If/when I finally figure it out, I'll definitely post back here.

See Ya!
Van

P.S.  If anyone else is curious about how to find duplicate records in the PortalSettings table, here's a query that will do the job:

SELECT COUNT(SettingValue) FROM DB.dbo.PortalSettings
WHERE PortalID = 0
GROUP BY SettingName
HAVING COUNT(SettingValue) > 1

Or if you don't trust the "Group By" and "Having" commands, you can just list the contents of the table in order of SettingName and scan that column to find dupes:

SELECT * FROM DB.dbo.PortalSettings
WHERE PortalID = 0
ORDER BY SettingName


See Ya! Van
 
New Post
5/1/2014 4:22 PM
Accepted Answer 

OK.  I figured it out, Sebastian.  I was using a skin that was suppressing the ViewState with the following property:
EnableViewState ="False"

Within the following line:
<%@ Control language="vb" CodeBehind="~/admin/Skins/skin.vb" AutoEventWireup="false" EnableViewState ="False" Explicit="True" Inherits="DotNetNuke.UI.Skins.Skin" %>

Suppressing the ViewState shut down the ability to change Site Settings.  It also disabled the ability to change Host Settings.  The Host Settings issue was very funny, though.  With no ViewState, when you try to update anything within Host Settings, you get this client-level error message:
"Address is invalid"

Really!  It makes you think that your host email address is using an incorrect format even though it is.  I saw a lot of messages from folks having an invalid email address issue within Host Settings, and a couple of them were unresolved.  I wonder if these folks were having a problem with ViewState, as well.

After removing the "EnableViewState="False" property, everything works fine.

"But Van, why on earth would you have a skin that suppresses the ViewState?"  Great question!  It turns out that there's some legacy custom code on this site from 2007 that generates a ViewState-related error when more than page is loaded in different tabs.  Suppressing the ViewState was a quick and dirty way of fixing the problem.  I guess we'll actually have to dig in and rework the code.

 Anyway, thanks your time!

See Ya!
Van


See Ya! Van
 
New Post
5/2/2014 5:04 AM
 
Van, I am glad you were able to figure it out and solve it. Viewstate is needed to maintain the status of each control - currently it is contained for more than just edit control, this will be optimized in DNN 7.3.0.
Regarding your duplicate search, I would suggest running the following statement in Host > SQL:
SELECT PortalID, SettingName
FROM {databaseOwner}[{objectQualifier]PortalSettings]
GROUP BY PortalID, SettingName
HAVING COUNT(SettingValue) > 1

Cheers from Germany,
Sebastian Leupold (Microsoft MVP)

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
Previous
 
Next
HomeHomeUsing DNN Platf...Using DNN Platf...Administration ...Administration ...Error when changing Site SettingsError when changing Site Settings


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.

Content Layout

Subscribe to DNN Digest

DNN Digest is our monthly email newsletter. It highlights news and content from around the DNN ecosystem, such as new modules and themes, messages from leadership, blog posts and notable tweets. Keep your finger on the pulse of the ecosystem by subscribing.  


Copyright 2017 by DNN Corp Terms of Use Privacy
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out