Still User Warning

FuXXz - April 16, 2009 - 02:30
Project:Node Invite
Version:5.x-0.6
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

Hello,

i get still the User Warning with the Version 06 :(

user warning: Column 'acted_upon' cannot be null query: INSERT INTO node_invites ( iid, nid ,email_invitee ,uid_inviter ,status ,sent ,acted_upon ,notes_invitee ,notes_inviter ) VALUES

Can you help me?

#1

shaisachs - May 25, 2009 - 22:55

Given the comments in #291587: User Warning as well as the update statements added in 5.x-0.2 and 5.x-0.3, my guess is that the preferred approach is to change the acted_upon column so that it is an int which defaults to null, rather than a not null int column. It looks like this approach was added to the _update functions, but not to the _install function, meaning that if you had started with 5.x-0.1 and upgraded up to 5.x-0.6, the code would work for you fine, but if you had installed 5.x-0.6 from scratch, then you'd get the error message.

The attached patch fixes the install file to use the approach found in the 5.x-0.3 update function. You will have to uninstall node_invite and then reinstall it to get it to work. That will wipe out your node_invite data, so if you have some node invitation data you care about, just issue this command to mysql instead of uninstalling node_invite:

ALTER TABLE node_invites CHANGE acted_upon acted_upon INT(11) UNSIGNED DEFAULT NULL

AttachmentSize
node_invite.install.patch 478 bytes

#2

shaisachs - May 25, 2009 - 22:59
Status:active» needs review

Whoops, forgot to update the status. I've tested this approach and it prevents the error message.

 
 

Drupal is a registered trademark of Dries Buytaert.