The signature_forum_update_7000() contains typos, and miss schema fixes.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | signature_forum_update-1632370-8.patch | 588 bytes | iva2k |
| #7 | signature_forum_update-1632370-7.patch | 966 bytes | liam mcdermott |
| #5 | signature_forum_update-1632370-5.diff | 1.72 KB | iva2k |
| #3 | signature_forum_update-1632370-3.diff | 1.84 KB | iva2k |
| #2 | 1632370_2_signature_forum_update.diff | 1.25 KB | szantog |
Comments
Comment #1
szantog commentedAnd fix it.
Comment #2
szantog commentedaa fix patch
Comment #3
iva2k commentedI found another typo. Unfortunately I already did migration from D6 and cannot test the whole update at once. I did it in bits and pieces, fixing errors and trying next step (by commenting out passed steps).
Given that the typos are obvious and missing call to schema switch was needed (I did it by hand). marking as RTBC.
Comment #4
liam mcdermott commentedThanks for the patch! I've committed it:
http://drupal.org/commitlog/commit/4512/528c38fdf824e51925fe64ca71ed4e94...
Comment #5
iva2k commentedSorry, my mistake - I did not clean out one commented out line which should remain (db_rename_table('signature_post', 'signature_forum_post');).
Please commit this patch instead. (Or restore "db_rename_table('signature_post', 'signature_forum_post');" line)
Comment #6
diakonos commentedI recently upgrade a site from Drupal 5 to Drupal 6 to Drupal 7 with the signature forum module to update. I found that there was an error during the update.php script. The error included the following: 1406 Data too long for column 'signature' [Sorry I don't have the full error message, but it referred to an error code, update statement and the following columms.]
I looked in the database and compared the {users}.signature column with the {users_signature}.signature column and found that the signature column in the {users} table is "varchar(255)" whereas the one in the {user_signature} table is "text".
This prompted me to investigate this further using:
SELECT uid, signature, LENGTH( signature )
FROM `users_signature`
WHERE LENGTH( users_signature.signature ) >255
Which I then discovered that there were indeed records in the {users_signature}.signature column to be greater than 255 chars. Needless to say that this was the primary cause of my update script failure. I subsequently deleted all the offending entries, but I have not tested the update script yet since it is on a production site. I will have to wait for the maintenance cycle.
Hope this helps someone or help to identify bugs that may need to be fixed. I will update this post as soon as I find out more about the update. Thanks.
UPDATE: Here was the complete original error message that I did not have before.
Now, I have the following errors:
Any thoughts would be helpful. Thanks.
Comment #7
liam mcdermott commented@ #5: I've already committed the patch in #3, so thought any new changes should go in another update.
Does the attached patch sense to you? If so, I'll commit it.
Comment #8
iva2k commentedNope, sorry if I confused you. Patch in #7 does not restore the mistakenly commented-out line.
Here's what I meant - see the patch.
UPDATE:
Don't use this patch, use #7
Comment #9
liam mcdermott commentedI'm confused, the patch in #8 seems to do the same thing as the patch in #7? The only difference is the mistakenly commented-out line is moved to a separate update function, so anyone who's already upgraded to the latest -dev release will also get the table name change.
The only thing I'm slightly concerned about #7 is: if someone's coming from the 6.x --> 7.x version of Signatures, will Drupal run both the 7000 and 7100 update functions? Or should the line with the db_rename_table() call in it be in both update functions?
Comment #10
iva2k commentedYep, you're right. I did not get that part... #7 is good. I better stop reading patches after long day at work.
Comment #11
liam mcdermott commentedHehehe, no worries! I also snuck in a docblock change into that patch and it wasn't immediately obvious the missing line had actually been moved down into its own update function. :)
Committed #7:
http://drupal.org/commitlog/commit/4512/0c9ebd48fe39ad06f509d491f6ce271f...
Comment #12
liam mcdermott commented@ #6: diakonos, sorry this is a pain, but would you mind creating a new issue for your problem using the 'Create new issue' link on this page?
It seems your problem is mostly unrelated to this issue. Thanks! :)
Comment #13
diakonos commentedNo problem. Thanks for the response.