When the Crap Hits the Fan

If you've ever tried to sync a list of contacts between your email and your smartphone, you know the process can have its glitches. This page explains what to do when things go sideways.

A user's email address is incorrect.  People often change email addresses and don't think to change all of the web sites that still have their old address on file.  Data entry errors by EAA staff also give us problems from time to time. Either way, the possible cures are the same: ask Trish to update the EAA database, or ask the user to update their own information via EAA's account management page. If Trish makes the change, it will have immediate effect, meaning you can update the member's record on the IAC web server without fear that it will be overwritten by the next download from EAA. If not, advise the member to wait a few days until the change propagates automatically, and if possible notify them when the update has reached the IAC web server.

A user's IAC number changes. This can happen through clerical error, or if a member lets their membership expire and re-joins some time later. In the latter case, a new IAC number is assigned, the member asks for their old number back, and EAA updates their record accordingly. Unfortunately this breaks our database synchronization script. Here's an example of the error messages that appear in the daily member sync report:

WD user: PDOException: SQLSTATE[23000]: Integrity constraint             [error]
violation: 1062 Duplicate entry 'Thomas Tiedt' for key 'name': INSERT
INTO {users} (uid, name, mail, created, status, init, data) VALUES
(:db_insert_placeholder_0, :db_insert_placeholder_1,
:db_insert_placeholder_2, :db_insert_placeholder_3,
:db_insert_placeholder_4, :db_insert_placeholder_5,
:db_insert_placeholder_6); Array
(
    [:db_insert_placeholder_0] => 430749
    [:db_insert_placeholder_1] => Thomas Tiedt
    [:db_insert_placeholder_2] => tommy@flyswim.com
    [:db_insert_placeholder_3] => 1379169424
    [:db_insert_placeholder_4] => 1
    [:db_insert_placeholder_5] => tommy@flyswim.com
    [:db_insert_placeholder_6] => a:1:{s:7:"contact";i:1;}
)
 in drupal_write_record() (line 7166 of
/usr/local/share/drupal7/includes/common.inc).

Troubleshooting options:

  1. Inspect the nightly download files to see what's changed.
    • cd ~webmaster/scripts/members
    • grep '"Last","First"' archive/*.csv membership-list.csv
  2. See what the sync script wants to do by running it in read-only mode:

    • drush -r $D7 -l www.iac.org scr syncit.php --readonly < membership-list.csv

If the problem is indeed a duplicate record in the download file, the most straightforward path is to contact EAA Member Services and ask them to delete the new record and update the expiration date on the member's original record.

If a decision is made to go with the new record, follow these steps instead:

  • Use ssh to log into www.iac.org
  • Search for the member's name in the download file, e.g. grep Molny.*DJ ~webmaster/scripts/members/membership-list.csv
  • Note the member's IAC number, which is the first field in the search results.
  • Browse to https://www.iac.org/users/joe-pilot (where 'joe' and 'pilot' are the member's first and last names)
  • Click on the Edit tab
  • Click on the My Profile link, update the IAC # and click on Save.
  • The next day's database synchronization should then succeed.