Developer forum

Forum » CMS - Standard features » User types and required fields

User types and required fields

Imar Spaanjaars
Imar Spaanjaars
Reply

Hi there,

I have created a user type called Location that I intend to use for records displayed on a map. As such, the only relevant fields are name and address data. Yet when I try to save such a record, I get the attached error saying I need to supply a user name and an email address.

Is that the intended behavior? Are those always required fields? Or am I using this feature incorrectly? Or is it a bug?

Imar

Image_432.png

Replies

 
Nicolai Pedersen
Nicolai Pedersen
Reply
This post has been marked as an answer

That is the feature you never knew you wanted...!!

That is a (re-appearing) bug - sent to QA. (Had the same issue)

BR Nicolai

Votes for this answer: 1
 
Imar Spaanjaars
Imar Spaanjaars
Reply

Ah, that explains it. Thanks!

 
Oleg Rodionov
Oleg Rodionov
Reply

Hi all,

I've created new TFS 50430 against the issue, should be specified by the feature owner finally. To be honest, the validation should be performed at least for user name in my view.

BR, Oleg QA

 
Imar Spaanjaars
Imar Spaanjaars
Reply

Thanks, Oleg!

 
Kristian Kirkholt
Kristian Kirkholt
Reply

Hi Imar

The problem regarding #50430 "User types and required fields" has been resolved in Dynamicweb version 9.4.15

To upgrade please choose this version download from here:

http://doc.dynamicweb.com/releases-and-downloads/releases

Let me know if you need any more help regarding this

Kind Regards
Dynamicweb Support
Kristian Kirkholt

 
Imar Spaanjaars
Imar Spaanjaars
Reply

Hi guys,

I just tested this in 9.4.18 and it seems that password is still required. When I create, say, a Dealer type with just some address info and no user name and password visible, I get the following response when I save:

"Password must contain numbers, upper and lower case characters and special characters."

I must enable, and enter, a password for it to work.

When I hide the User name field, and then create a new user without an email address, I get a hard .NET Exception:

Server Error in '/' Application.


Username or Email must have a nonempty value

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: System.Exception: Username or Email must have a nonempty value

Source Error: 
 

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.


Stack Trace: 
 

[Exception: Username or Email must have a nonempty value]
   Dynamicweb.Security.UserManagement.User.Save() +650
   Dynamicweb.Admin.UserManagement.EditUser.Save() +4869
   Dynamicweb.Admin.UserManagement.EditUser.Page_Load(Object sender, EventArgs e) +1790
   System.Web.UI.Control.OnLoad(EventArgs e) +106
   System.Web.UI.Control.LoadRecursive() +68
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3785
 

 

Looks like this needs a bit more work to be really usable. Would love to be able to create new "users" with just basic data such as an address so I can use them as dealers, shops, event locations and so on.

Thanks!

Imar

 
Oleg Rodionov
Oleg Rodionov
Reply

Hi Imar,

I've tested the case on DW9.4.18 and have appropriate popup defines with #50430 fix (please, have a look at the code changes and discussion inside the TFS if needs). Since you mentioned the specific notice I've used password security feature enabled. The same results are when the feature is disabled. Please, find the proof.

Please, ensure that your admin is 9.4.18 in fact or provide more details about your setup otherwise.

BR, Oleg QA 

 
Oleg Rodionov
Oleg Rodionov
Reply

HI again,

I've just seen some issue related to not saving the user if Name field is extra exists for the type and password security is enabled (but no exception occurs). So, current work around - temporary disable the feature.

Please, confirm the case fits your one to submit new TFS.

BR, Oleg   

 
Imar Spaanjaars
Imar Spaanjaars
Reply

I'm pretty confused by these videos ;-) In your last one, you seem to be showing Address Only twice. The first time it works, the second time it doesn't. What's the difference?

And am I correct that I cannot have a type that just has a name and address fields, but that it must have at least either a user name or an email address? That would be OK, but I would like to know for sure.

And is the password issue a bug that will be fixed and is the "temporary disable the feature" work around just temporary? If not, that would be a pretty bad work around  ;-)

Cheers,

Imar

 
Oleg Rodionov
Oleg Rodionov
Reply

HI,

The logic was defined by #50430 prohibits create new user without name/user name/email, appropriate notice is shown to user - first video taken with user item type has only address fileds (Address1&Address2) regardless password security enabled/disabled. The second video says the following issue - if the type has at least 'Name' field and the same address fields then it's not possible to create backend user ('Allow backend login' option is provided via its parent group) and password security is enabled. It's OK when either the password security is disabled or the created user is not 'backend' one or the type has password field as well. New TFS 53978 has been created against the unsaving.

BR, Oleg  

 
Imar Spaanjaars
Imar Spaanjaars
Reply

OK thanks Oleg!

 
Imar Spaanjaars
Imar Spaanjaars
Reply

Hi Oleg,

I just looked at the fix in 53978 and I am not sure it makes sense. Instead of presenting the error message "Password must contain numbers, upper and lower case characters and special characters." in a hidden way (since the password field is not visible) as it was previously, it now shows it in an alert box. This is a little better as you can at least tell what the problem is: a missing password.

However, the underlying problem isn't fixed: having the ability to create a "user" without a user name or password. For example, I'd like to create a Store location which would have these fields:

- Name
- Street
- Zip code
- City

And nothing else. I thought the whole idea of user types would be to allow us to create definitions like that, without having awkward fields that only make sense to true users. Adding a password field to a store just to meet the password requirements doesn't make a lot of sense to me.

In my opinion, I should be able to create a user type like the above, and then I should be able to create a user / store based on that definition without supplying a password. Whether Dynamicweb internally then generates a password or marks this user as a "password-less" user somehow, I don't care.

Does this make sense? Or am I rambling?

Imar

 
Oleg Rodionov
Oleg Rodionov
Reply

Hi Imar,

It may have any sense in fact. I've notified the feature owners in DW about it and asked to comment the topic. Thanks.

 BR, Oleg QA

 
Martin Vang
Reply

Hi Imar,

I'll get QA to explain to me exactly what the problem is. I can easily create users with Password security enabled and only UserName visible - which is, as you said, the whole point.

To make it clear: You are supposed to be able to create new users without passwords, if the user is configured as such.

I'll get QA to update once this is fixed. Thanks for the feedback! :)

BR

Martin

 
Imar Spaanjaars
Imar Spaanjaars
Reply

Thanks Oleg and Martin!

 

You must be logged in to post in the forum