Will "the Mighty" Strohl

DNN Forum Module Error: User Settings is currently unavailable

There is an obscure and seemingly untraceable error that may occur with the DotNetNuke (DNN) Core Forums Module.  This error states, "User Settings is currently unavailable."  I believe that I have nailed down how this happens and how to fix it!

This appears to be a logical and data structure conflict within the Forum Module (versions 3.20.09 and below).  I am not 100% sure about the exact combination of events to reproduce this, but when you have a User account which is in the Administrators role, and you add this role as a Moderator to at least one forum, and then at some point add this same account to the Global Moderators, this will happen.  (Sorry for the run-on sentence...)

In my case, this error only happens to the user accounts that have some combination of the above events.  All other user accounts behave normally when you try to view their profiles within the Forum Module.

In order to fix this, I needed to run an SQL script against the database. 

WARNING!!!  Do not run this script without first backing up your database!!!

Here is what I did:

-- change the ID number to match the user you are trying to fix
SELECT @UserId = 1;
UPDATE [dbo].[Forum_Users] SET [IsGlobalModerator] = 0
WHERE [UserID] = @UserId AND [IsGlobalModerator] = 1
DELETE FROM [dbo].[Forum_Moderators] WHERE [UserId] = @UserId
INSERT INTO [dbo].[Forum_Moderators]([UserID],[ForumID],[AssignedDate],[PostsModerated])
SELECT @UserId, [ForumId], GETDATE(), 0 FROM [dbo].[Forum_Forums]
-- optional SELECT statement to see the results
SELECT [UserID],[ForumID],[AssignedDate],[PostsModerated]
FROM [dbo].[Forum_Moderators]
ORDER BY [ForumID], [UserId]

The final SELECT statement was just so I can look at the results of the Moderators table to see what I had done.  It isn't required.

After running this SQL script on your database, I would imagine that you will also no longer have this problem.  :)

blog comments powered by Disqus