Comments

ed@moskvin.ca’s picture

Status: Active » Patch (to be ported)
StatusFileSize
new868 bytes

Here is the patch.

And many thanks for the great module!

quicksketch’s picture

Thanks, 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.

quicksketch’s picture

Status: Patch (to be ported) » Needs review
StatusFileSize
new277 bytes

I 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.

quicksketch’s picture

Title: The scheme is slightly incorrect » The schema for users.mail is slightly incorrect
claudiu.cristea’s picture

Version: 7.x-1.5 » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

@quicksketch, 255 is not the size but the index sub-part. So, #1 patch is correct and works.

RTBC for #1

krlucas’s picture

StatusFileSize
new823 bytes

The 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.

quicksketch’s picture

Thanks @krlucas! This fixes #2457091: Getting PDOException when installing this module, so I marked it duplicate.

caiosba’s picture

I 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.

AlexKirienko’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev

Thank you @caiosba!

norman.lol’s picture

Confirming #1 on 7.x-2.0-rc1. When will this finally get merged?

ckng’s picture

Priority: Minor » Major

This breaks fboauth installation, setting to major.

Confirmed patch #1 fixes the issue.

miromarchi’s picture

Confirming patch #1 fixes the issue.
In 7.x-2.0-rc3 there is some fuzz:

patching file fboauth.install
Hunk #1 succeeded at 67 (offset 5 lines).
Hunk #2 succeeded at 84 with fuzz 1 (offset 5 lines).

Thanks!

Chris Charlton’s picture

Bump.

rgnyldz’s picture

Is #1 going to be commited ?

manoloka’s picture

#1 worked for me too

thanks