feed-me icon indicating copy to clipboard operation
feed-me copied to clipboard

Error importing users into fresh database: 1048 Column 'uid' cannot be null

Open mizziness opened this issue 4 years ago • 0 comments

Description

When importing users, all users with the admin role all return with an error and are not included in the import. The error looks like:

image

info ↳ Users: Match existing element with data {"username":"applausewebmaster"}. 5/22/2021 11:30 AM
info ↳ Users: Data ready to import {"username":"applausewebmaster","firstName":"applause","lastName":"webmaster","email":"[email protected]","preferredLocale":"","id":"1"}. 5/22/2021 11:30 AM
error ↳ Users: SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'uid' cannot be null The SQL being executed was: UPDATE elements SET dateUpdated='2021-05-22 15:31:00', uid=NULL WHERE id=1 - Schema.php: 678. 5/22/2021 11:31 AM

Other users who were not admins import successfully.

Steps to reproduce

  1. Have a Craft site with several users, some with the Admin role and some without.
  2. Export all of the user data via Craft CMS gui (I chose extended JSON)
  3. Create a new database, run Craft installation, and then sync your project-config - this creates the schema.
  4. Use Feed-Me to set up a feed for the new database - the fields are 1 to 1 as it's the same site schema.
  5. Run the import feed.
  6. Get error.

Additional info

Craft edition & version | Craft Pro 3.6.15 Database driver & version | MySQL 5.7.32 PHP version | 7.4.12

image

(I hate that I can't easily copy/paste the details from the system report here...it breaks the markup super badly.)

mizziness avatar May 22 '21 15:05 mizziness