This is the error which happens if a person has an expired cookie and they then register at the site:

PDOException: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column 'referral_uid' at row 1: INSERT INTO {referral} (uid, referral_uid, created, host, http_referer) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 921 [:db_insert_placeholder_1] => -268764678 [:db_insert_placeholder_2] => 1346124606 [:db_insert_placeholder_3] => 72.91.149.250 [:db_insert_placeholder_4] => ) in _referral_user_save() (line 205 of /home4/growtogi/public_html/sites/all/modules/referral/referral.module).

Comments

Anonymous’s picture

This looks at least similar to a fields problem with huge Integers. See #1003692: PDOException: SQLSTATE[22003] after entering large value in integer and decimal field.

What I don't understand is, why a value of -268764678 causes this database error. What database do you use?

Perhaps the value has to be unsigned, so this would explain why the negative value is refused.

I hope this information helps the maintainers a little bit. Can't help more, because I'm not using the module as yet.

IWasBornToWin’s picture

I'm pretty sure I found the issue. If a user goes to the site with a referral code which is no longer valid - referring user deleted or whatever, then the error is thrown. Because the code cant be found when attempting to create a join. User referral module should have a condition that if the referring code isn't in the records then no referral record is created. But it doesn't. And no one maintains this module, so use at your own risk and hopefully you can tell your site users to clear their cookies so they can then register.