Describe the bug
I'm using this plugin on a client's site to sync Salesforce Contact objects to WordPress Users. 17 fields are mapped, it's set to pull every 5 minutes and to push whenever a WP user is created or updated, and the "Process asynchronously" checkbox is checked. When more than 25 records are updated in Salesforce at once (e.g. by bulk editing a list in SF), only 25 records are updated in WordPress.
To Reproduce
Steps to reproduce the behavior:
- Log in to the WordPress site and map Salesforce Contacts to WordPress Users. Schedule a pull every 5 minutes. You can set the field map to push to SF when a WP user is created or updated, but that doesn't appear to be necessary to reproduce this issue.
- Enable debug logging in the Object Sync for Salesforce plugin settings.
- Log in to Salesforce, view Contacts, and select 26 or more records.
- Edit a field (change everyone's state to MN, for instance) to trigger a bulk update.
- Watch the debug log and/or user list in WordPress.
25 new users will appear (after 5 minutes or so, once the scheduled pull has been performed). The debug log will show the initial query retrieving 25 records, those records being added to the Action Scheduler queue, and the corresponding records being created or updated in WordPress. If the plugin is set to push to Salesforce as well, it will show some or all records being pushed back to SF (which isn't really necessary, but isn't a problem either). Then it will show a new query for users with a different LastModifiedDate cutoff that returns 0 results. None of the other records updated in SF will be synced, unless they're updated separately.
Note: early on in my troubleshooting I suspected that the 5-minute pulls were too frequent, that maybe one pull didn't have enough time to finish before the next pull began, but based on the logs I've examined, the pull and subsequent push take less than one minute to complete.
Expected behavior
All updated records are synced to WordPress. Debug log should show a query that fetches the first 25 records, then another that fetches the next 25, until they've all been retrieved. Subsequent pushes back to SF are (again) unnecessary but acceptable.
Environment (please complete the following information):
- WordPress Version: 5.1.1
- Other relevant plugins: Object Sync for Salesforce 1.8.12, WP Members 3.2.6.1
- PHP Version: 7.3.15
Additional context
I'm assuming the limit of 25 comes from here, but my understanding from looking at the surrounding code there is that that's not supposed to be a "hard" limit -- that after pulling 25 records, the plugin should run another query to sync the next 25, and so on, rather than ignoring subsequent records. But please correct me if I'm wrong!
Thanks so much.
Describe the bug
I'm using this plugin on a client's site to sync Salesforce Contact objects to WordPress Users. 17 fields are mapped, it's set to pull every 5 minutes and to push whenever a WP user is created or updated, and the "Process asynchronously" checkbox is checked. When more than 25 records are updated in Salesforce at once (e.g. by bulk editing a list in SF), only 25 records are updated in WordPress.
To Reproduce
Steps to reproduce the behavior:
25 new users will appear (after 5 minutes or so, once the scheduled pull has been performed). The debug log will show the initial query retrieving 25 records, those records being added to the Action Scheduler queue, and the corresponding records being created or updated in WordPress. If the plugin is set to push to Salesforce as well, it will show some or all records being pushed back to SF (which isn't really necessary, but isn't a problem either). Then it will show a new query for users with a different
LastModifiedDatecutoff that returns 0 results. None of the other records updated in SF will be synced, unless they're updated separately.Note: early on in my troubleshooting I suspected that the 5-minute pulls were too frequent, that maybe one pull didn't have enough time to finish before the next pull began, but based on the logs I've examined, the pull and subsequent push take less than one minute to complete.
Expected behavior
All updated records are synced to WordPress. Debug log should show a query that fetches the first 25 records, then another that fetches the next 25, until they've all been retrieved. Subsequent pushes back to SF are (again) unnecessary but acceptable.
Environment (please complete the following information):
Additional context
I'm assuming the limit of 25 comes from here, but my understanding from looking at the surrounding code there is that that's not supposed to be a "hard" limit -- that after pulling 25 records, the plugin should run another query to sync the next 25, and so on, rather than ignoring subsequent records. But please correct me if I'm wrong!
Thanks so much.