Many URLs are longer than 255 characters—particularly Facebook/social referral URLs. As a result, recording referrals from these sources causes a SQL error:
PDOException: SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'http_referer' 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 ( ... ) in _referral_user_save() (line 205 of .../referral/referral.module).
In my opinion, http_referer should be a TEXT column to fix this issue.
Comments
Comment #1
AlexKirienko commentedWe have same issue for users signed up from Facebook.
Comment #2
AlexKirienko commentedPlease check attached patch.
Comment #3
socialnicheguru commentedrerolled with latest dev version (11/2016)
Comment #4
socialnicheguru commentedUpdated the update hook # so as not to conflict.