• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed No message to correct user field when editing user

Affected version
Version 2 candidate release

Mr Lucky

Well-known member
#1
If someone registered before you had a compulsory user field at registration, then you try to edit their info, in xf1 you get a popup to say the field entry is missing. You then add it and can go ahead with the edit.

In xenforo 2 you just get nothing, and no edit happens so you sit there scratching your head wondering why.
 

Chris D

XenForo developer
Staff member
#2
There is a change since XF1 but we think it's reasonable and if anything think it was bugged in XF1.

If an admin is editing a user in the Admin CP, that requirement to fill a custom field is removed.

Similarly, if a moderator is editing a user on the member edit screen, we don't require a value on required fields.

To put it in perspective, if you had a required Occupation field, it doesn't really make sense for a Moderator to be filling that in on behalf of a member. They'd likely just be making it up.

In xenforo 2 you just get nothing, and no edit happens so you sit there scratching your head wondering why.
Cannot reproduce this. Any values entered are saved, whether the "required" fields are filled or not. There's no error because of the aforementioned reasons.

Only thing I can think of is that the form redirects to the same page without any sort of success message, so I've added that for the next release.
 

Mr Lucky

Well-known member
#3
Cannot reproduce this. Any values entered are saved, whether the "required" fields are filled or not. There's no error because of the aforementioned reasons.

Only thing I can think of is that the form redirects to the same page without any sort of success message, so I've added that for the next release.
We may be talking about different cases here.

It isn't about a missing field entry (which does work fine) but one that is filled in wrongly according to current criteria.

Previously there was a question: Are you a spammer, if not enter a capital N. This was left over from previous admins vBulletin). I thought that was quite lame so I changed it to "enter the first three letter of the middle name of this forum in lower case (the answer is use).

So there are lots of old users with N in that field that cannot be edited until it is either emptied or changed to use.


In this case I kept trying to save the edit and but it just didn't save (no saving activity message or orange line across the top) so it was not a successful save.

This was a xf2 test site. I then went to do the exact same edit in xf1 live site and I got the message that the field was wrong so it wouldn't save. It did save when I emptied the field or made it the correct answer.

So I then went back to xf2 and tried again but with the incorrect field "N" removed and it was all fine, saved perfectly.

This really is a bug, it can't be as designed because it is very confusing, you need to know why it isn't saving, as with xf1
 
Last edited:

Chris D

XenForo developer
Staff member
#4
You're right, moderators shouldn't bypass the value match requirements. In my case I'm just playing with a default custom field, Facebook. This requires basically an alphanumeric value (with dots allowed). It already had a valid value in (from my testing before) and I just tried to edit it again with some characters that aren't allowed, e.g. !@#$% and I got an appropriate error.

What you've described doesn't sound like it should be able to happen. The behaviour sort of sounds similar to if the validation is via HTML5 patterns. These would prevent the form being submitted at all, but an error would be displayed next to the field itself. If you're not seeing anything there, then it could be something blocking the request entirely. If you have any fields which are related to advertising then ad blocking software could totally prevent the request from going through. If you have an adblocker enabled, at least, definitely worth trying to disable it to see if the issue persists.
 

Mr Lucky

Well-known member
#5
If you have an adblocker enabled, at least, definitely worth trying to disable it to see if the issue persists.
No adbloker. No addons at all in fact. It is very easily reproducible. here is the exact same user in xf1 then in xf2

Neither save, but xf1 gives you the reason.



I can give you admin access if you want to quickly try it.
 

Chris D

XenForo developer
Staff member
#6
This is likely similar to what I mentioned before:
The behaviour sort of sounds similar to if the validation is via HTML5 patterns. These would prevent the form being submitted at all, but an error would be displayed next to the field itself.
Try saving again, but with the user field visible on the screen.

(Obviously I can appreciate there's still potentially an issue with this approach).
 

Chris D

XenForo developer
Staff member
#7
I've been able to reproduce the issue now. It relates to, as I mentioned, form fields which are validated on the client side. You'll notice that if you can see the field when you click save, it will display an error next to it. As we employ an accordion system here, the field and the error may not be visible. So I've disabled form validation here which will still submit the form but allow our code to detect and report any relevant errors.
 

Mr Lucky

Well-known member
#8
Try saving again, but with the user field visible on the screen.

(Obviously I can appreciate there's still potentially an issue with this approach).
Yes, as you say it shows a message if the accordion is owned, but it's a message you wouldn't normally see or know about

I've been able to reproduce the issue now. It relates to, as I mentioned, form fields which are validated on the client side. You'll notice that if you can see the field when you click save, it will display an error next to it. As we employ an accordion system here, the field and the error may not be visible. So I've disabled form validation here which will still submit the form but allow our code to detect and report any relevant errors.
Great, thanks. Although maybe if there are errors the form should not be submitted (so it's the same as xf1)
 

Chris D

XenForo developer
Staff member
#9
To clarify, the behaviour in XF2 RC2 is now the same as XF1. In both cases, the form IS submitted to the server, but no changes will happen because a normal XF error overlay will display instead.
 

Mr Lucky

Well-known member
#10
This bug seems to be back.

No message, no accordion opening to reveal what is wrong. Even with all accordions open, while the error message is there you are not able to scroll down tom the accordions anyway.
 

Chris D

XenForo developer
Staff member
#11
You mention an error message (error overlay I assume). That’s what we added to fix this. It’s not designed to navigate to the field or anything like that.
 

Mr Lucky

Well-known member
#13
I think this may be a different bug then, I am unable to edit any user as I get that error overlay. have made all required fields optional and just get that message with no clue as to what needs doing
 

Mr Lucky

Well-known member
#15
Oops! We ran into some problems.
Please enter a value that matches the required format.

I started a new thread as this seems a new issue as I can't resolve it, nothing I do regarding checking and fillng filelds seems to stop the message.

Go back to exact same user in xf1 live forum and all works fine.