2

I followed the instructions in the docs at https://docs.craftcms.com/v3/changes-in-craft-3.html#user-photos.

I can browse the User Photos in the User Photos Asset Volume in the Control Panel. However, the User Photos are not linked to their respective User Accounts. I noticed that in the C3 craft_users table the photoId col is NULL. I can add an asset ID manually and the User Photo displays in the User Account in the CP.

I can upload new User Photos in User Accounts in the Users section of the CP.

How can I link the original Craft 2 User Photos to the User Accounts (ca. 100) in Craft 3?

  • are you saying that you have 100 user accounts and can't do this manually? – Clark Nelson Jun 7 '18 at 21:54
1

The migration should have taken care of that. The only scenario where it's not a bug I can imagine is if you ran the migration on a staging server that did not have the actual user photo files and then pushed the DB to live server. If that's not the case, can you get in touch via support@craftcms.com?

  • Thanks Andris for confirming expected behaviour. I performed the upgrade in my local Homestead/Vagrant dev environment. It was a little while ago, so it would have been on an early RC. I wonder if this has anything to do with the recent issue of assets with leading underscores in file names not being indexed? Fortunately, this is a test upgrade, so I may just try again on the most recent RC. I'll let you know. – Andrea DeMers Jun 8 '18 at 14:27
  • I tried a fresh upgrade from Craft 2.6.3017 to Craft 3.0.10.3 via Composer and got the same result. I noticed the Craft 3 upgrade process creates a storage/userphotos folder. However it is empty. I assume this makes sense because it doesn't know where to get the User Photos from. Is there a step missing in the Performing the Upgrade section that goes something like: "Copy your old craft/storage/userphotos over to your new project's storage/userphotos? – Andrea DeMers Jun 11 '18 at 23:52
1

I solved the problem by adding the following (missing) step to the Performing the Upgrade section of the docs at https://docs.craftcms.com/v3/upgrade.html#performing-the-upgrade:

Copy your old craft/storage/userphotos/ over to your new project's storage/userphotos/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for?Browse other questions tagged or ask your own question.