U4-2516 - Error saving member without email address

Created by Ben Curthoys 16 Jul 2013, 12:40:26 Updated by Rune Grønkjær 05 Aug 2013, 13:27:32

I have a database full of members that I've imported, not all of them having email addresses. Since upgrading from 6.0.2 to 6.0.7, attempting to edit and save a member without an email address throws an exception

[NullReferenceException: Object reference not set to an instance of an object.] umbraco.cms.presentation.members.EditMember.MemberEmailExistCheck_ServerValidate(Object source, ServerValidateEventArgs args) +205 System.Web.UI.WebControls.CustomValidator.OnServerValidate(String value) +172

This happens even if the edit that I'm making is to add an email address. Members who already have email addresses can be edited and saved fine.

If I run update cmsMember set Email = 'not set' where Email = '' then I can save the member again, but I'd rather not do that, as an invalid email address is worse than none at all.

In this system, accounts and passwords are created in advance and posted to people, and they supply their email address when they first log in and activate their account, which doesn't seem totally unreasonable.


Sebastiaan Janssen 18 Jul 2013, 15:00:50

Fixed in changeset e48f08b6579b3698ec03b6d86c6bb8fbefadb471

Rune Grønkjær 05 Aug 2013, 08:32:23

Does this mean that members in v6.1.3 can now be saved from the backend without an e-mail again?

Sebastiaan Janssen 05 Aug 2013, 11:50:26

@Rune Yeah, is you have an existing member you can leave the email address blank. The email is still required in the create new member dialog though. You can create members through the api without an email address.

Rune Grønkjær 05 Aug 2013, 12:02:55

Cool thanks Sebastiaan. I still think the new member dialog should respect the "requiresUniqueEmail" attribute from the web.config. I can't see why it should'nt :)

Sebastiaan Janssen 05 Aug 2013, 12:04:51

@Rune It does.. the email has to be unique in that dialog too. I guess you're thinking of removing the required field for email address there, right?

Rune Grønkjær 05 Aug 2013, 13:06:59

@Sebastiaan Yes, I guess I am. Is there a way to do that, that I don't know of?

Sebastiaan Janssen 05 Aug 2013, 13:12:27

@Rune Off the top of my head: just remove the asp:RequiredFieldValidator from the aspx file, that should do the trick. But I don't see why we should require an email address there anyway so we might just have to remove that requirement altogether.

Rune Grønkjær 05 Aug 2013, 13:27:32

Don't just remove it. Someone probably uses it :) Maybe a setting somewhere would be more appropriate.

Priority: Normal

Type: Bug

State: Fixed


Difficulty: Normal


Backwards Compatible: True

Fix Submitted:

Affected versions:

Due in version: 6.1.3


Story Points: