1. 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

Discussion in 'Future-Fix Bug Reports' started by Marcus, Aug 28, 2013.

  1. Marcus

    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: Aug 28, 2013
    saadali2112 likes this.
  2. Jon W

    Jon W Well-Known Member

    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.
  3. Mike

    Mike XenForo Developer Staff Member

    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.
    Jon W likes this.
  4. Marcus

    Marcus Well-Known Member

    I had to write myself a specific one for my task. Now my users have updated values :)
    Jon W likes this.
  5. Mike

    Mike XenForo Developer Staff Member

    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.
    Marcus likes this.
  6. Marcus

    Marcus Well-Known Member

    That's fine:)
    flowerpot132 likes this.

Share This Page