Closed (fixed)
Project:
Salesforce Suite
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
27 Jan 2011 at 15:45 UTC
Updated:
31 Jan 2014 at 14:17 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
aaronbaumanI should have time to review this this week or early next.
Comment #2
aaronbaumanOK, this makes good sense.
We should use the
foreach(module_implements())pattern instead ofmodule_invoke_all()so that we can pass arguments by reference, in case implementations need to make last-minute changes.Also, in the attached patch:
pre_importhooks to after the import object creation loop$changesarray to values passed to salesforce_api_pre_import_importhookspre_exporthooks to usemodule_implements()Let me know.
Comment #3
kostajh commentedI did not test this, but read through the code and it looks good. Thanks for your work on this. I don't understand why
$nameis passed twice in the post_import hook?$name is passed twice.
Powered by Dreditor.
$name is passed twice again.
Powered by Dreditor.
Comment #4
kostajh commentedComment #5
kostajh commentedJust another comment to say that after a day of testing and working with the hooks provided by this patch, I've been able to get past a number of issues that have been affecting the site I'm working on. The hooks are extremely useful in mitigating weaknesses / bugs elsewhere in the Salesforce suite code, so I support getting this into dev sooner rather than later.
Comment #6
aaronbaumanI agree that this should get in ASAP, especially in light of the discussion on #1058870: user_save fails in sf_user_import().
Here is an updated patch to address Kosta's points in comment #3 -- should be passing $changes at the last parameter, not $name twice.
This is my first git patch, so please be gentle.
I'll let this marinate over the weekend, and then it's going into dev.
Comment #7
kostajh commentedLooks great. Thanks Aaron!
Comment #8
aaronbaumanOK folks, this is in.
http://drupalcode.org/project/salesforce.git/commit/3891af7
Thanks
Comment #10
aaronbaumanCross posting #1092786: sf_user_export does not react to salesforce_api_pre_export hook changes to fieldmap name - change to pre/post import hook arguments.
Comment #11
Sborsody commentedThe duplicate variable for hook_salesforce_api_pre_import() still appears in hooks.php. I was getting "Missing argument 5" errors when implementing the hook. Here's the patch.
Comment #12
kostajh commentedCommitted to 6.x-2.x-dev, thank you. http://drupalcode.org/project/salesforce.git/commit/5dc05e4
Comment #13
EvanDonovan commentedWasn't applicable to 7.x, because in that branch, there is no separate user_import, and thus no changes parameter. If people need to track changes between the old and new versions of a user, that will have to be a separate feature request in 7.x.
Comment #15
kenorb commentedFor 7.x please see: #2186153: Provide additional Salesforce push/pull hooks for pre_export changes.