Closed (fixed)
Project:
Anonymous Posting
Version:
7.x-1.0-beta7
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
16 Apr 2012 at 07:05 UTC
Updated:
21 Jun 2012 at 18:21 UTC
Jump to comment: Most recent file
Comments
Comment #1
drikc commentedI don't have much thought about this; I've just used the same one found in the comment module! I you really need I could change that length or also if you want to contribute to this with a patch you are welcome. Let me know.
Comment #2
yashadev commentedHere's a quick patch to extend the email length
Comment #3
yashadev commentedHere's a quick patch to extend the email length
Comment #4
drikc commentedHello, the patch extend the input html tag length to 255 but steel the storage schema definition is set to 64. Also some care must be taken with installed module, i.e., in a hook_update_N() to alter that schema.
Comment #5
drikc commentedComment #6
yashadev commentedThis should fix the problem. Let me know after testing
Comment #7
drikc commentedThere is steel an update_hook_N to be done to update existing schema to 254 length.
Comment #8
yashadev commentedHere you go. This should work.
Please read the following guidelines for the email length:
According to RFC 5322, RFC 5321, and RFC 3696, (http://en.wikipedia.org/wiki/Email_address#Syntax),
So the email format should be [64 chars max]@[253 chars max] with the total length of 254 chars.
The patch is written so the database is set to 255 chars because the standard databases are set to use 255 chars maximum; therefore, using 254 chars would probably slow down the process.
Comment #9
drikc commentedI can see in your update_hook_N() the following line:
It will fail because the '$columns['mail'] is unset!
Comment #10
yashadev commentedIt runs without giving any errors and sets the database to the correct varchar length.. What should it be set to then?
I've tested the patch to check if the email is being passed to the database and whether the article is submitted or not. It all worked out well.
Comment #11
drikc commentedHere is your full hook_update_N():
This code for sure didn't change any db schema! See what you get when this hook is run (attached pict).
Comment #12
drikc commentedFinally I have it done:
Comment #13
drikc commentedMhh steel need work as it doesn't update the schema when the table contain data!
Comment #14
yashadev commentedAlright, I'll take a look at it again in a bit
Comment #15
yashadev commentedOmg.. finally got it.
The following patch changes the varchar length in the database from 64 to 255.
It also adds a new line at the end of the file.
From How to Make a Simple Module with a Form and Menu Link
Comment #16
yashadev commentedComment #17
yashadev commentedThanks for the commit. Question - the patch committed inserts the following:
Is there a reason it updates the data table twice? Just curious
Comment #18
drikc commentedI've modified some bits in you patch (revision table need to be updated also): http://drupalcode.org/project/anonymous_posting.git/commitdiff/d35971e?h...
Comment #19
yashadev commentedOhh okay makes sense. Thanks