• We are bulk loading 1300+ Salesforce Contacts into WordPress and having it create WordPress users. We are loading them in batches of 150 and we are seeing them get into an endless loop of pulling the same 150 over and over again. We can see that somehow the sync is also pushing to Salesforce as the custom WordPressID field in Salesforce is getting populated. It seems that it’s a viscous cycle of a Pull causing a Push which then starts the cycle all over again. Why is the Object Sync triggering a Push after the Pull has been processed. We are only seeing this on Contact/User sync and not with any other Custom Post types that we are mapping.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter Tim Nolte

    (@tnolte)

    I was just looking at the database table and I can see that there are 2 records in the wp_object_sync_sf_object_map table for every single user. How would this be happening?

    Thread Starter Tim Nolte

    (@tnolte)

    One other things that I’m seeing is that for Contacts coming from Salesforce I am seeing that at some point the RFC 3339 EXTENDED date/time formatted field for Last Modified Date coming from Salesforce is being converted to just a date with no time at all. It seems this is also causing a problem. We haven’t written any code to change any of that data.

    Thread Starter Tim Nolte

    (@tnolte)

    Still digging into this and what I’m seeing now with the duplicate object map records for WP Users is that 1 is getting created on a Pull, and then the second one is getting created on an immediate Push that is somehow being triggered. It seems like the Push request is not seeing the already created object mapping record from the Pull that came before.

    Thread Starter Tim Nolte

    (@tnolte)

    Just providing updates as I try to debug this so as to hopefully provide enough details as to find what could possibly be causing this. I should also not that we are still only running 1.9.9 and haven’t updated to the latest release from a couple weeks ago. I’m concerned about the new ACF updates since currently our ACF fields are all working right now and we are close to launch and need to keep things as stable as possible.

    Anyways, the last go around was that we had the email address set as a Prematch key on our Contact <-> WP User field mapping. I completely removed that and are basically relying on Salesforce rejecting duplicates when the Push that is following the Pull reverts to a Create since no prematch was done for email address. This results in the second duplicate object map entry to be a failed mapping with a tmp_* Salesforce ID but essentially we don’t care because we already have a good object mapping record from the Pull that occurred.

    I tested creating a WP User and everything works without a hitch when creating in WordPress. The only disadvantage that we have is the case where we would somehow have a new Contact in Salesforce that hasn’t made it’s way to WordPress a new WordPress user with the same email address could get created and then we may end up with mapping errors that are going to be manually resolved. I think this scenario should be a small risk.

    While I’ve figured out a “work around” this issue is not resolved. I can’t understand why a Push is happening as a result of a Pull creating a new WordPress User. My only other suspicion is if there is another plugin we have installed that is hooking into the user creation process and modifying the record in some way that the Object Sync process thinks that the WP User record has been updated.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    My guess is that your suspicion at the end is correct, I haven’t seen this happen, so I think it’s likely that it is related to another plugin.

    Version 1.10.0 won’t be a fix for this. The only ACF thing it does is for when records are saved on front end ACF forms.

    Thread Starter Tim Nolte

    (@tnolte)

    So I have found that Toast SEO is hooking into user_register and updating a user meta field. I was attempting to unregister their action hooks but didn’t see them actually being unregistered. Going to attempt just deactivating the plugin and test again. That is the only custom field, besides the ACF/custom fields that have been added to users that are setup in the Field Mapping.

    Plugin Author Jonathan Stegall

    (@jonathanstegall)

    I’m assuming you mean Yoast SEO. I haven’t used Yoast, but I’m vaguely familiar with it. I guess let me know if deactivating Yoast prevents this from happening. Yoast is popular enough that it would be good to figure out if there’s a way to get around that problem, if Yoast is the cause.

    Thread Starter Tim Nolte

    (@tnolte)

    Ha, oops that was a typo I did mean Yoast SEO. So I deactivated Yoast SEO and it didn’t solve the issue.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Salesforce Contacts to WordPress Users Created Endless Loop’ is closed to new replies.