BuddyDev

Search

[Resolved] Default value in custom fields are not saved after updating

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #46124

    Hi there, even though the default value has been set to none, the setting is not saved, and a default value is displayed in the custom profile fields during registration.

    This is a problem, specially with non editable fields like the Single Member Type field type.

    Profile field default value none setting:
    https://imgur.com/Rg1Um3E

    After updating:
    https://imgur.com/OkKzZaJ
    https://imgur.com/1DfWa2k

    Also a problem with the drop down select box

    Profile field default value none setting:
    https://imgur.com/NB46cKC

    After updating a default value has been selected anyway:
    https://imgur.com/rnNwSSS

    Why are the default values not saved?

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #46186

    I noticed that the members types default value “Mand” (Man) is not registred correct as Member Types Man.

    I have associated the user role Contributor to Member Types Man, but this is not assigned.

    https://imgur.com/xbJhBta

    Instead the user gets assigned the New User Default Role (subscriber).

    https://imgur.com/aF8qavL

    It’s a problem that new users pr default is assigned the Member Types “Man” and the user role subscriber.

    Is this a bug with Member Types Pro working with Custom Profile Fields?

    Regards
    Carsten

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #46195

    This is an urgent issue, since member types and associated roles are messed up.

    Why is the Single Member Type (and other custom fields) default value not saved?

    https://imgur.com/36JtZww

    https://imgur.com/4KuOjyw

    Thanks

  • Keymaster
    (BuddyDev Team)
    Posts: 24636
    Brajesh Singh on #46198

    Hi Carsten,
    Thank you for reporting the issue. Please allow us to investigate and get back to you today.

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #46207

    Hi Brajesh, thanks for looking into this, please let me know if you need admin access to my site to see what is going on.

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24636
    Brajesh Singh on #46216

    Hi Carsten,
    Please do provide access to your site. I tested and the default values are saved and applied. Probably something on your site is conflicting and causing it. Have you tried it on a staging site with a different theme?

    Regards
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #46219

    Hi Brajesh, I tested with Twenty-Twenty-Two, with same result.

    Can I mail you the credentials to my site?

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24636
    Brajesh Singh on #46245

    Hi Carsten,
    Thank you for the mail.

    I had a look at the site. There is definitely something interfering on your site. I changed the default value to the second one “kvinde”. It is still showing “mand” on profile field lists/registration page but on the profile field edit page in the admin(Users->Profile Fields->Edit) it shows the correct value selected.

    I need to disable some of the caching plugins and others to find out the issue. May I do it there or do you have any staging site for the purpose?

    Thank you
    Brajesh

  • Participant
    Level: Yogi
    Posts: 1117
    calu on #46251

    Hi Brajesh, thanks for acknowledging the issue, you are welcome to do whatever needed on this site.

    Thanks again

    Regards
    Carsten

  • Keymaster
    (BuddyDev Team)
    Posts: 24636
    Brajesh Singh on #46252

    Hi Carsten,
    Thank you.

    your issue is persistent cache. You have some plugin/utilities active(either by you or your hosting provider) that provides persistent object caching. I checked the value for

    
    wp_cache_get( '0:4749', 'bp_xprofile_data' )
    

    and it is set to ‘male’. To be honest, this is partially a bug in BuddyPress where it should have checked for availability of a valid user id before checking cache.

    This is causing the issue. I will be posting on BuddyPress trac about this shortly. I am still not sure how the value for this was set in the cache.

    Should I update the BuddyPress function to avoid checking the cache when user id is 0 on your server. This is probably causing issue with your other select/radio field as well.

    Regards
    Brajesh

The topic ‘ [Resolved] Default value in custom fields are not saved after updating’ is closed to new replies.

This topic is: resolved