This is not quite the same as #1011958: Hash is not updated when node is updated! This actually was uncovered _after_ I applied that patch to my copy of Feeds.

I'm working on a feed that imports Users and their profiles, using the Profiles2 module. I've created my own processor that works on users and profiles together, and mostly it works.

The problem here is that you're using hook_user_update() to react to updated Users and calling feeds_item_info_save(). However, when you use user_save to save an existing user, the feeds_info data that you've attached to the object 'drops off' when the user is reloaded during the process, and so there's nothing to write. I've managed to make it work by using hook_user_presave() instead. (The documentation for hook_user_presave() says that it gets called on new and existing user saves, but looking at the code that's currently not the case. I put in a check for $account->is_new anyway.)

I'm going to try and run up a patch in a moment, here.

Comments

jcfiala’s picture

Huh.

Well, I was going to provide the change I made as a hook, but you've apparently switched over to using hook_entity_update instead of hook_user_update for writing the feeds_info. I think there's still the same problem there, but I don't have time right now to verify it.

michaek’s picture

I am still seeing this. It seems from initial inspection that it's not updating because it's comparing an array of fields without values.

michaek’s picture

Actually, the comparison isn't wrong. I don't have a grasp of what I'm seeing yet, except that sometimes the hashes are identical when new data is imported.

MegaChriz’s picture

Issue summary: View changes
Status: Active » Closed (cannot reproduce)

If this is still an issue, feel free to reopen.