Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

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

HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryRepositoryBL.ConvertToRoles ErrorRepositoryBL.ConvertToRoles Error
Previous
 
Next
New Post
4/28/2008 9:42 PM
 

I am trying to run Repository 3.01.13 on DNN 04.08.02 - my site worked on the old hosting provider, and everything else is working on the new hosting provider except for this,,, I have one repository on a page, with a dashboard on the same page.

Here's the error that keeps getting recorded:

AssemblyVersion: 04.08.02
PortalID: 3
PortalName: CALLERLAB
UserID: 1
UserName: host
ActiveTabID: 91
ActiveTabName: Documents
RawURL: /Documents/tabid/91/Default.aspx
AbsoluteURL: /Default.aspx
AbsoluteURLReferrer: http://callerlab.org.dnnmax.com/Documents/tabid/91/ctl/Module/ModuleId/1023/Default.aspx
UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727)
DefaultDataProvider: DotNetNuke.Data.SqlDataProvider, DotNetNuke.SqlDataProvider
ExceptionGUID: 3b5cb368-9030-45d3-8b65-52252382ebb9
InnerException: Object reference not set to an instance of an object.
FileName:
FileLineNumber: 0
FileColumnNumber: 0
Method: DotNetNuke.Modules.Repository.RepositoryBL.ConvertToRoles
StackTrace:
Message: DotNetNuke.Services.Exceptions.PageLoadException: Object reference not set to an instance of an object. ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Modules.Repository.RepositoryBL.ConvertToRoles(String RoleIDs, Int32 PortalID) at DotNetNuke.Modules.Repository.Repository.CheckItemRoles() at DotNetNuke.Modules.Repository.Repository.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) --- End of inner exception stack trace ---

I have tried reinstalling the module, making sure that the settings were ok, reapplying the dashboard settings, and I have no categories displaying in the dashboard, and no documents listed.

I have roles and there is a role clicked for the upload and download settings on the repository module.

I tried unclicking the Ajax flag (don't think I use it on anything) but that didn't change anything.

Any ideas?  Searched and couldn't find this error.  Thanks in advance!

 
New Post
4/30/2008 2:12 PM
 

I was getting this same error after I removed and re-added a portal to the shared area using DNN Masters Multi Portal User Sharing Xtreme.

I fixed it by giving "All Users" Edit permissions to the repository.  I then removed "All Users" Edit permissions and everything continued to work.

You might want to give that a try to see if it fixes it.

 
New Post
5/1/2008 8:15 AM
 

Thanks for that tip,,,

I had that installed and removed it before I moved this portal (it wasn't working as it should).

I tried your suggestion, and still gettting the same error.  I'll have to poke around some more, I guess.

 
New Post
5/1/2008 10:54 AM
 

Hi Patty,
Unfortunately, this can happen if you assign a Role to a Repository function, then delete the Role. Is it possible that you may have deleted a security role?

The code in the ConvertToRoles function is rather straightforward.. It converts the comma-delimited list of roles to a comma-delimited list of RoleNames that can be passed to the IsInRole() security function.

Dim RoleNames As String = ""
Dim RoleID As String = ""
Dim oRoleController As New DotNetNuke.Security.Roles.RoleController
Dim oRoleInfo As DotNetNuke.Security.Roles.RoleInfo

For Each RoleID In RoleIDs.Split(";")
  If RoleID.ToString() <> "" Then
    If RoleID = -1 Then
      RoleNames = RoleNames & DotNetNuke.Common.glbRoleAllUsersName & ";"
    Else
      oRoleInfo = oRoleController.GetRole(RoleID, PortalID)
      RoleNames = RoleNames & oRoleInfo.RoleName & ";"
    End If
  End If
Next
Return RoleNames

The highlighted code is most likely the culprit. I take the RoleID and lookup the Role, then I do not check to make sure I got back a valid Role object before accessing the RoleName property. That is really the only code in this function that would throw the exception you're seeing, and the only reason it would throw that exception is if the RoleID assigned to a particular Repository function no longer existed.

The solution is to look at the module settings for the various roles, and take note of the RoleIDs being stored in the ModuleSettings table. You should be able to identify which RoleID is invalid and remove it from the setting.

Let me know if that helps you solve your problem.

 
New Post
5/2/2008 1:12 AM
 

Hi Steve,,,

YOU ARE A LIFESAVER!!!!!  There were a bunch of roles (like almost all of them) that I believe got incompletely deleted when I removed the multi-portal application before I migrated this site - I took your advice and ended up going through all tables in the DB that stored a RoleID - if it the ID didn't exist in the current role table, the record got deleted.  I then double checked the tables affected by the DeleteRole stored proc to make sure I found the orphans that I missed - and now things are working as they should.  I sure didn't want to re-upload all those documents!

Thanks again for pointing me in the right direction!  I am switching service providers, and this was the very last thing I had to get fixed before getting my client to review the **new** new site.  Maybe I'll not think about this tonight!

 
Previous
 
Next
HomeHomeDNN Open Source...DNN Open Source...Module ForumsModule ForumsRepositoryRepositoryRepositoryBL.ConvertToRoles ErrorRepositoryBL.ConvertToRoles Error


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.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out