Support » Plugin: User Meta Manager » Problem With New Users

Viewing 15 replies - 1 through 15 (of 16 total)
  • Plugin Author President McCheese


    Hi again. 🙂

    So, just so I’m clear on this –

    1) You add a new member via Dashboard > Users > Add New
    2) You go to Dashboard > Edit Users > {the new user}

    – and your custom meta profile fields are not there for the new user? Or, is this not what you mean?

    Did you select a “Field Type” for each Custom Meta field you created?

    Hi Jason

    Thanks for coming back to me.

    In wp_usermeta there is a record for each custom meta key for each user, including the new users. But the meta_value is blank for each. The user meta manager editor does not allow me to edit the blank values and it does not allow me to add them either.

    So what I have had to do is go into the database manually, change the meta_value from blank to xxxxxx, and when I refresh the editor I am able to edit the xxxxxx away with the value I actually want.

    I was on the latest version of the plugin up until today, but I reverted to the last version that worked consistently for me (which I am still on : 2.0.9) and the problem remained.

    Here is a quick video to show you :


    Plugin Author President McCheese


    Thanks for the detailed explanation and video!

    The plugin’s data structure changes between versions. Upgrading and downgrading probably will not return favorable results. The data from the newer version should be deleted before an older version is installed, or the saved data can become corrupted.

    Your custom meta keys may have been deleted from the plugin’s saved data, or the data structure doesn’t match the current version.

    I haven’t been able to reproduce this issue yet. However, I will keep looking.

    Yes – I realise that (we are also plugin developers) – but given that the problem arose before I went back to the older version, I figured I didn’t have anything to lose!

    We can probably help with the fix? We can look at the code of the latest version and try to see what could be happening? One way would be to change the code to include allowing it to recognise and therefore edit blank values.

    Plugin Author President McCheese


    Yes – I realise that (we are also plugin developers)

    I didn’t intend to insult your intelligence. 🙂

    You will probably need to start from fresh because your saved data is corrupted somehow.

    I reached this conclusion because on a clean install, I could not reproduce this bug.

    Here were my steps –

    1. In User Meta Manager settings I set the option Retain Saved Data On Uninstall: to No
    2. Deactivated and deleted the old version.
    3. Installed the new version
    4. Created a new custom meta key with a blank default value.
    5. Added the test key to the Home table Columns.
    6. Added a new test user via the User > Add New dialogue.
    7. Returned to User Meta Manager to edit the test key for the test user, using the table actions.

    The test worked without a glitch. The test meta key which had a blank default value was visible and editable in all screens. So, the plugin does recognized blank values.

    Have you tested this on a clean install on a different website?

    Plugin Author President McCheese


    If your data IS indeed corrupted, and you are unable to start from fresh, I can write a script to help you recover, if you want.

    Plugin Author President McCheese


    I think what may have happened is, during an upgrade or downgrade, your custom keys were deleted from the plugin’s saved options. The custom meta keys still exist in the database, but do not exist in User Meta Manager’s saved data. So, when you attempt to recreate the key, it fails because the key DOES already exist in the database. And, when you attempt to edit the key, it fails because the key is no longer in the plugin’s saved data.

    The custom key exists in one area but not the other. It must exist in both database AND User Meta Manager saved data. The data is out of sync.

    So what we need to do is copy the existing custom keys over to the new data structure, or delete the existing custom keys from the database and start fresh.

    I hope that makes sense. 🙂

    Jason – sorry I did not for a moment think you were insulting my intelligence. Not sure how much of that I have at 3:30am when I last wrote to you anyway!

    I will do as you suggest. The corruption could have occurred when I went back to an older version about a month ago after an upgrade that didn’t work. I was aware it might cause an issue but with so few records I was willing to do it.

    You fixed the problem at the time and I was able to re-upgrade. Then I didn’t get a new user into my membership site until now, and have only just discovered the problem. That might explain it.

    I’ll do that today and let you know how it goes.

    All that key info you just described makes perfect sense. We’re doing the data manipulations now.

    Plugin Author President McCheese


    Actually, I have a solution that might work easily.

    Open wp-content/plugins/user-meta-manager/user-meta-manager.php

    Find on line 1390
    if($meta_key_exists && $_POST['mode'] == 'add'):

    Replace with

    //if($meta_key_exists && $_POST['mode'] == 'add'):
    if($_POST['mode'] == 'add'):


    Then go add the missing custom meta keys.
    That SHOULD override the check which stops the process if the meta key already exists.

    Backup your data first though!

    Plugin Author President McCheese


    Wait, I did that wrong.

    if($meta_key_exists && $_POST['mode'] == 'add'):
               // Key already exists
               $output = '<span class="umm-error-message">' . __('Error: Meta key already existed. Choose a different name.', UMM_SLUG) . '</span>';
            else: // Key doesn't exist

    if($_POST['mode'] == 'add'):

    Plugin Author President McCheese


    Hi Liz, Did we resolve this issue?

    No Jason. I want to get some time to re-visit this today. I could not see how to uninstall the plugin so as to wipe all data clean. Some was left behind and we couldn’t find it. I wanted to do a clean install …

    Plugin Author President McCheese


    $delete_meta_keys = array('key1', 'key2'); // Array of meta keys to delete
    global $wpdb, $user_ID, $table_prefix;
    if ('' == $user_ID){
       wp_die("Login first!");
    foreach($delete_meta_keys as $meta_key){
        $query = "SELECT * FROM ".$wpdb->users;
        $data = $wpdb->get_results($query);
        foreach($data as $user){
            delete_user_meta($user->ID, $meta_key);
    $wpdb->query("DROP TABLE IF EXISTS " . $table_prefix . "umm_usermeta_backup");
    print('Action completed.');

    Edit the $delete_meta_keys variable to suit your needs and run the script from the root WP directory. That will remove any meta keys you listed in the $delete_meta_keys variable, and any data associated with User Meta Manager.

Viewing 15 replies - 1 through 15 (of 16 total)
  • The topic ‘Problem With New Users’ is closed to new replies.