Reviewed & tested by the community
Project:
Facebook OAuth (FBOAuth)
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2012 at 12:44 UTC
Updated:
5 Aug 2020 at 15:59 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ed@moskvin.ca commentedHere is the patch.
And many thanks for the great module!
Comment #2
quicksketchThanks, I think you're right about us needing to recreate the indexes "to maintain database portability" (whatever that means, maybe PostGres?)
This patch doesn't look correct though, the format of indexes doesn't include the column length (which I'm guessing is what the 255 is?) and the point of the update is to set the column length to 320 anyway.
All of this might be a moot point because Facebook no longer provides pseudo "mask" e-mail addresses anyway. They're all now simply "username@facebook.com". Unfortunately for continued compatibility, it's unlikely we'll simply be able to set the column length back, as it will likely truncate any e-mails that used this format while Facebook was providing the feature.
Comment #3
quicksketchI think this is what the patch should look like. The "indexes" options usually are formatted simply
$name_of_index => array($col1, $col2). In the case of the mail index, it just has one column, so the index is formatted as'mail' => array('mail'). There's also no need to modify the index or provide the description in hook_schema_alter() as far as I can tell, since these properties already exist in user_schema() and don't need to be redefined.Comment #4
quicksketchComment #5
claudiu.cristea@quicksketch, 255 is not the size but the index sub-part. So, #1 patch is correct and works.
RTBC for #1
Comment #6
krlucas commentedThe following patch simply removes the unnecessary
$schema['users']['fields']['mail']['description'] = "User's e-mail address.";
from the hook_schema_alter.
The 255 index sub-part aka index prefix is necessary because of some esoteric (to me) InnoDB restrictions on index size.
Comment #7
quicksketchThanks @krlucas! This fixes #2457091: Getting PDOException when installing this module, so I marked it duplicate.
Comment #8
caiosba commentedI was getting "SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes" with the other patches on an InnoDB database on MySQL 5.5.5. I just had to change the order of a couple lines, as per the attached patch.
Comment #9
AlexKirienko commentedThank you @caiosba!
Comment #10
norman.lolConfirming #1 on 7.x-2.0-rc1. When will this finally get merged?
Comment #11
ckngThis breaks fboauth installation, setting to major.
Confirmed patch #1 fixes the issue.
Comment #12
miromarchi commentedConfirming patch #1 fixes the issue.
In 7.x-2.0-rc3 there is some fuzz:
Thanks!
Comment #13
Chris CharltonBump.
Comment #14
rgnyldz commentedIs #1 going to be commited ?
Comment #15
manoloka commented#1 worked for me too
thanks