Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Hi,
When the Eloqua modules sends post information via cron if the next cron run is triggered before the first one finishes you will end up with duplicates. This is easy to fix using Drupal's lock features. This issue will show up immediately on Acquia since it uses multiple servers to trigger cron jobs at the same time.
Goto line 51 in eloqua.module and replace the eloqua_cron function with the one below:
module_load_include('inc', 'eloqua', 'eloqua.cron');
$lock = lock_acquire('eloqua_cron',300);
if($lock) {
_eloqua_cron();
lock_release('eloqua_cron');
}
Comments
Comment #1
1point21 CreditAttribution: 1point21 commentedSo I actually found a deeper cause of this issue in the function _eloqua_post_create it is always returning true. The line $result = ($result !== FALSE && $result !== NULL); in eloqua.inc needs to be removed so that the database row number is returned otherwise it will always return 1 which cause a bug when the function eloqua_post_create attempts to call _eloqua_post_update.
Comment #2
drupalninja99 CreditAttribution: drupalninja99 commentedSo is this not solved by this patch - https://drupal.org/node/1807456? I would think so. In which case I will close this as a duplicate. Let me know if that is not the case, thx!