• Resolved daikukoji

    (@daikukoji)


    I used Import Users from CSV successfully to import 1020 users with extended fields. The extended fields (including street1, street2, city, province, postal_code, etc.) all appeared in the wp_usermeta table with proper values. I want useres to see these values in their profiles when they log in, and to be able to update them.

    By editing the WordPress file, \wp-admin\user-edit.php I was able to make all fields appear in the profile. It looks like all the logins work fine. So what’s the problem? —

    I cannot get the extended fields to update! If a user enters a new value for user_email, user_url, first_name or last_name, the update performs flawlessly. But if the user tried to enter a new value for street1, street2, city, province or postal_code, nothing happens! The value in the database doesn’t change.

    I definitely do not understand exactly how WP performs its updates in the database.

    Can anyone help me here? Is there a way of changing user-edit.php to get the updates to happen, or do I need to go elsewhere? I’ve been spending way too much time on this!! Thank you.

    https://www.ads-software.com/extend/plugins/import-users-from-csv/

Viewing 12 replies - 1 through 12 (of 12 total)
  • Plugin Contributor Ulrich Sossou

    (@sorich87)

    It is not recommended to modify WordPress core files.
    You can use a plugin like Register Plus Redux to add the fields.

    Thread Starter daikukoji

    (@daikukoji)

    Ulrich, thank you for your advice. I’ll look into doing it with Register Plus Redux.

    I hope you don’t mind me asking, but did you have any luck with this? I already had Redux installed and, after a successful import of members’ data using this import plug-in,I tried adding custom fields into Redux. I used the exact names I’d used as column headers on the import, but nothing showed up in the users profiles(that is to say, the name of my new fields appeared, but with no data visible). Was this your experience and, if so, did you manage to get round it?

    Thread Starter daikukoji

    (@daikukoji)

    Michael,

    Yes, I did use Register Plus Redux, the custom fields did appear in the profiles, and changing values in the fields and Updating them worked. It’s puzzling that you are not seeing the data in the new fields.

    I found that I made heavy use of phpAdmin to view (and experiment with) the tables wp_users and wp_usermeta in my WordPress database, where all the custom data is stored. Have you looked at these tables? Is the custom data there?

    Thanks for your prompt reply.

    I checked the usermeta table and yes, the custom data and Fields are there following my import. However, here’s the curious thing: I imported a column of data called ‘STATUS’. Then I went into Redux and defined a custom field called ‘STATUS’. I looked at a profile. The field label was showing, but no data populated the profile box, even though phpadmin showed me that that user did have data for that field. This seems to be the same for all fields that I define – that is, the field title shows up in the profile, but with no data. I tried entering some random text in the STATUS profile box and clicked ‘Save’ – and, going back into phpadmin, was able to see that my random text had overwritten the original entry for that user. So, the fields I define in Redux are showing up, but they’re just not showing the data which already exists for my users.

    I have to say I think the ‘usermeta’ table WordPress uses is a real messy way of doing things, but that’s a bye-the-bye. I’ve no idea what could be causing this. Didn’t you say you altered the user_edit.php file with some success? Maybe it’s worth poking about in there? Or maybe the author of this plug-in will notice this and have some ideas? If you can help with any suggestions, I’d be very grateful. I have nearly four hundred users to import, with a ton of data for each amassed over the years, and the thought of inputting it all manually is pretty depressing…

    TIA.

    Plugin Contributor Ulrich Sossou

    (@sorich87)

    Maybe it has to do with the case of fields names (lowercase vs uppercase)?

    I wondered about that, so – as my site is in preparation – I deleted all users (except myself!) and then imported just one. Both before and after creating a custom field with redux, there was only one entry in the usermeta for the ‘STATUS’ field. And, it had the data as imported visible within phpadmin, but not when viewing the user’s profile. I altered the profile entry from ‘blank’ to some random text and saved it. Then I checked back in phpadmin and, sure enough, the only entry for ‘STATUS’had been updated to reflect this. So, for some reason, the profile is displaying my custom fields – but not the data contained in the usermeta table.

    The only other plug-in I have running which uses the usermeta table for anything is AMR Users, but de-activating this doesn’t change things. I’m stumped!

    Update: I’ve now discovered the Redux has been removed from the WP repository as it is apparently full of security holes. I’m going to try using Cimy Extra User Fields instead, although that keeps its data in a separate table which it creates on installation, so I’m not expecting instant results. I don’t suppose there is a way to get Import Users CSV to import into a different table?

    Plugin Contributor Ulrich Sossou

    (@sorich87)

    I don’t suppose there is a way to get Import Users CSV to import into a different table?

    No.
    Take a look at Cimy User Manager: https://www.ads-software.com/extend/plugins/cimy-user-manager/

    Hello all. I am in the same boat. I need to add extra user fields to the WP users table, and have installed Cimy Extra and Cimy User Manager. however here is my dillema…

    I add a custom/extra field called “department”
    and to test it, I exported current users to csv – which lists the column header for ‘department’ with no data. So I add data to that column in the csv and then goto import that back into the users table.

    But, I’m guessing since the extra fields are added in a different table it says that ‘field doesn’t exsist and doesn’t update that field at all… Have you guys worked this out for importing user datat with extra fields you create? And can you post the solution?

    Thanks!

    and it looks like I can add department manually in the ‘extended users’ section where the department column is listed in WP backend… But what I am wanting to to is do mass user import with extra fields in import and have them added to the right place…

    I gave up on Cimy in the end. As you suggest, it uses its own table so the import users process (I used https://www.ads-software.com/extend/plugins/import-users-from-csv/ for this) does not find or write to it. I defined all the fields I thought I’d need (based on my existing data) in WP-Members. Then I exported the table frameworks (wp-user and wp-usermeta) into a merged csv file (with headers!) and populated it with my raw data – just plain ol’ cut-n-paste did the trick here – then I imported my users using the plug-in I referenced above. Worked for me. Look out for making sure you match up the user ID field with any that already exist – oh, and also read the plug-in’s FAQ for an understanding of what exactly it does.

    HTH

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘[Plugin: Import Users from CSV] Extra fields appear in profile but won't update’ is closed to new replies.