With a 4.5.1 install of Drupal and the latest release of the opt-in, I recieve a mysql column name error after trying to create my first opt-in.

URL: /admin/user/configure/optin

user error: Unknown column 'fid' in 'field list'
query: INSERT INTO optin (optin_id, name, fid, role_granted, role_required)
VALUES (1, "Newsletter", -1, -1, -1) in /home/httpd/vhosts/domain.net/httpdocs/includes/database.mysql.inc on line 125.

warning: Cannot modify header information - headers already sent by (output started at /home/httpd/vhosts/domain.net/httpdocs/includes/common.inc:344) in /home/httpd/vhosts/domain.net/httpdocs/includes/common.inc on line 155.

Comments

nshb’s picture

When I modify the table to look like this:

CREATE TABLE `optin` (
`optin_id` int(10) NOT NULL default '0',
`name` varchar(32) NOT NULL default '',
`fid` varchar(32) NOT NULL default '',
`role_granted` int(10) NOT NULL default '0',
`role_required` int(10) NOT NULL default '0',
KEY `optin_id` (`optin_id`)
) TYPE=MyISAM;

Everything is ok.

njivy’s picture

Yeah, that's exactly right. I forgot to commit the latest version of the MySQL schema. If you download it again, it should be right.

Thanks for noticing.

Anonymous’s picture