Closed (fixed)
Project:
Migrate
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Dec 2011 at 19:51 UTC
Updated:
19 Feb 2012 at 21:23 UTC
Scenario - I have a file migration which grabs user avatars and creates file objects for them. My user migration then uses sourceMigration() to get those fids into $account->picture. Works nicely on initial import, but running with --update clears the pictures. This is because user_save(), on update only (not insert) expects $account->picture to be a file object rather than a fid. MigrateDestinationUser needs to deal with this.
Comments
Comment #1
mikeryanCommitted to D7.
Comment #2
mikeryanNot relevant to D6.
Comment #3
mototribe commentedHi Mike,
I'm using the 7.2.2 version and am trying to update the user picture (after I migrated the image first). It doesn't update the "picture" column in the users table. I tried the dev version but ran into errors and went back to 7.2.2.
I copied the extra code from from the dev version of plugins/destinations/user.inc but still no success.
When I add the fid manually to the users.picture field the picture shows up ok.
I followed the examples and it's updating other fields, just not the picture field. Here is the relevant code:
Any help is appreciated. Thanks!
UWE
Comment #4
mototribe commentedgot a workaround - I added this to the image import migration:
thanks to http://drupal.org/node/1120136#comment-4320404