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?

1
  • are you saying that you have 100 user accounts and can't do this manually? Commented Jun 7, 2018 at 21:54

2 Answers 2

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 [email protected]?

5
  • 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. Commented Jun 8, 2018 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? Commented Jun 11, 2018 at 23:52
  • Is there any way to run just the userphotos part of the upgrade? - it seems the permissions where not right on our upgrade and the user photos did not update.
    – Green17
    Commented Nov 2, 2020 at 19:44
  • @Green17 that migration was pretty and not very reversible. The only way to re-do it would be to re-upgrade. Commented Nov 4, 2020 at 11:51
  • @AndrisSevcenko thanks spoke to Craft on it and they said manual job or write a script based on github.com/craftcms/cms/blob/develop/src/migrations/….
    – Green17
    Commented Nov 4, 2020 at 12:56
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/

1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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