开发者

How do I fix DNN registration NullReferenceException on ProfilePropertyAccess.DisplayDataType?

开发者 https://www.devze.com 2023-04-12 21:12 出处:网络
On our production environment users are unable to register. They r开发者_高级运维eceive: An error has occurred. Error: User Registration is currently unavailable.

On our production environment users are unable to register.

They r开发者_高级运维eceive: An error has occurred. Error: User Registration is currently unavailable.

The stacktrace is:

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 DotNetNuke.Entities.Users.ProfilePropertyAccess.DisplayDataType(ProfilePropertyDefinition definition) at DotNetNuke.Entities.Users.ProfilePropertyAccess.GetRichValue(ProfilePropertyDefinition prop, String strFormat, CultureInfo formatProvider) at DotNetNuke.Entities.Users.ProfilePropertyAccess.GetProperty(String strPropertyName, String strFormat, CultureInfo formatProvider, UserInfo AccessingUser, Scope currentScope, Boolean& PropertyNotFound) at DotNetNuke.Services.Tokens.BaseCustomTokenReplace.replacedTokenValue(String strObjectName, String strPropertyName, String strFormat) at DotNetNuke.Services.Tokens.BaseTokenReplace.ReplaceTokens(String strSourceText) at DotNetNuke.Services.Localization.Localization.GetSystemMessage(String strLanguage, PortalSettings objPortal, String MessageName, UserInfo objUser, String ResourceFile, ArrayList CustomArray, IDictionary CustomDictionary, String CustomCaption, Int32 AccessingUserID) at DotNetNuke.Services.Mail.Mail.SendMail(UserInfo user, MessageType msgType, PortalSettings settings) at DotNetNuke.Entities.Modules.UserModuleBase.CompleteUserCreation(UserCreateStatus createStatus, UserInfo newUser, Boolean notify, Boolean register) at DotNetNuke.Modules.Admin.Users.ManageUsers.UserCreateCompleted(Object sender, UserCreatedEventArgs e)

I suspect there is a profile property definition missing. I'm wondering how to fix this error?


It turns out my ProfilePropertyDefinition table DataType column values do not match EntryID values from the Lists table.

select * from profilePropertyDefinition

compared to

select * from Lists
where Listname = 'DataType'
order by EntryID

I figured this out by

  1. Noticing users are actually added
  2. Then I looked at a working dnn install's profile property page. Compared to the broken one.
  3. The broken one was missing the data type field.
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号