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

Future fix Checkbox user field edit: no user updates

Marcus

Well-known member
#1
when you edit the user field checkbox key, the user keys are not updated, but still hold the old keys. Tables xf_user_field_value and xf_user_profile(custom_fields) should be updated

/admin.php?user-fields/ field name / edit
 
Last edited:

Jon W

Well-known member
#2
I quite like how it works at present. It allows you to mess about with adding and removing keys without messing with the current data. Perhaps a Custom Fields Cache Rebuilder would be nice though -- but I guess that is a suggestion, not a bug.
 

Mike

XenForo developer
Staff member
#3
Basically rebuilding the fields on save may not be doable. The other alternative is mostly to prevent you from editing the internal keys after you create a field (like you can't change the ID).

xf_user_field_value is the canonical version. Anything in xf_user_profile is simply for caching and optimization.
 

Marcus

Well-known member
#4
I quite like how it works at present. It allows you to mess about with adding and removing keys without messing with the current data. Perhaps a Custom Fields Cache Rebuilder would be nice though -- but I guess that is a suggestion, not a bug.
I had to write myself a specific one for my task. Now my users have updated values :)
 

Mike

XenForo developer
Staff member
#5
I should note that the code structure means that if you "change" a key, you're actually just deleting the old one and creating a new one. That probably isn't the behavior that you want.

At this point, documentation that you shouldn't change keys if users have selected them is really the only option.

We can look at other ways of handling this in the future.