Developer forum

Forum » Development » Null exception from FillRow in UserRepository

Null exception from FillRow in UserRepository

Tor Leeberg
Reply

I have a solution that has started throwing null exceptions when trying to save users:

System.NullReferenceException: Object reference not set to an instance of an object.
   at Dynamicweb.Security.UserManagement.UserRepository.FillRow(DataRow row, User user)
   at Dynamicweb.Security.UserManagement.UserRepository.SaveUser(User user)
   at Dynamicweb.Security.UserManagement.User.Save()
   at Dynamicweb.UserManagement.Frontend.Frontend.SaveForm(ParagraphSettings settings)
   at Dynamicweb.UserManagement.Frontend.Frontend.GetContent()
   at Dynamicweb.Frontend.Content.GetModuleOutput(Paragraph paragraph, PageView pageview)

The origin of the save does not seem to matter, as it happens when creating normal users, when creating users from an external login and when saving users in custom code. According to visual studio, the null exception is thrown in the foreach loop that goes through users.CustomFieldValues in UserRepository.FillRow(DataRow row, User user), but I'm not sure how accurate that is.

Is this a known bug that has been fixed in a future version? the solution is on DW 9.13.3 and Dynamicweb.UserManagement 3.0.7

 


Replies

 
Shiwanka Chathuranga Dynamicweb Employee
Shiwanka Chathuranga
Reply

As this is your custom code, if you can post you code block that will help to answer this quickly 

 
Tor Leeberg
Reply

I figured it out: a merge had brought in an observer that was trying to set a custom user field on UserOnBeforeSave that hadn't been created :) 

 

You must be logged in to post in the forum