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.
Comment | File | Size | Author |
---|---|---|---|
#4 | referral-http_referer-text-2316625-4.patch | 1.01 KB | SocialNicheGuru |
#2 | referral-http_referer-text-2316625-2.patch | 1.32 KB | AlexKirienko |
Comments
Comment #1
AlexKirienko CreditAttribution: AlexKirienko at WikiJob commentedWe have same issue for users signed up from Facebook.
Comment #2
AlexKirienko CreditAttribution: AlexKirienko at WikiJob commentedPlease check attached patch.
Comment #3
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedrerolled with latest dev version (11/2016)
Comment #4
SocialNicheGuru CreditAttribution: SocialNicheGuru commentedUpdated the update hook # so as not to conflict.