• Resolved itestense

    (@itestense)


    I’ve created a form that seems to work pretty well. However I have entered three extra fields (profession, city, etc.) which are not saved to the database. However, if the administrator goes to approve the user, he actually sees the three dropdowns where he can enter the values ??and if he selects them they are saved correctly in the database. The data is correctly sent in the POST during registration. What can cause this behavior?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hello there, we have encountered a similar issue where we are unable to view any form data in the user’s profile. We tried creating a new form assuming that the previous one was corrupted, but we are still facing the same problem. Additionally, we are unable to get any user meta fields with code too. Thank you.

    As a quick fix, we added the following function to functions.php:

    function remove_ur_filter_test(){
    remove_filter(‘user_registration_before_save_profile_details’, ‘user_registration_conditional_user_meta_filter’, 10, 3);
    }
    add_action( ‘after_setup_theme’, ‘remove_ur_filter_test’ );

    It removed the filter that was causing the issue. But please fix the issue so to don’t have to use custom code.

    Thanks

    I am getting the registrations but they are not complete. First and Last name are missing and custom fields are missing (Basically nickname and email are getting in) checked the DB as well nothing in the fields for first and last name and the custom fields are not getting generated.

    error logs show…

    Undefined array key “urcl_hide_fields” in plugins/user-registration/includes/functions-ur-core.php on line 3893; PHP message: PHP Warning: foreach() argument must be of type array|object, null given i

    plugins/user-registration/includes/frontend/class-ur-frontend-form-handler.php on line 219″ while reading response header from upstream

    I tried (bishnugopali) functions.php patch code but that did not do the trick for me.

    Thread Starter itestense

    (@itestense)

    I confirm the patch DOESN’T work.

    However the hint bt @midladnauctions was very useful.

    Code around line 3893 in includes/functions-ur-core.php is very bad. It should be:

    if(!array_key_exists('urcl_hide_fields', $_POST)){
        return $valid_form_data;
    }
    $hidden_field = $_POST['urcl_hide_fields'];
    
    if ( empty( $hidden_field ) ) {
        return $valid_form_data;
    }
    // etc. etc.

    Now it works. I hope the author will patch this file soon.

    Plugin Support Sandip Pokhrel

    (@sandippokharel)

    Hi @itestense @midladnauctions @bishnugopali

    We will release an update that fixes this issue in a while.

    Regards!

    Plugin Support Sandip Pokhrel

    (@sandippokharel)

    Hi @itestense

    The update has been released.

    Regards!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Some fields are not saved’ is closed to new replies.