Future fix Checkbox user field edit: no user updates

Marcus

Well-known member
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:
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.
 
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.
 
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 :)
 
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.
 
Back
Top Bottom