og2list.mysql file creates og2list_incoming_content:

-- mail-in.pl passes a *simple* mail to the og2list module
CREATE TABLE og2list_incoming_content (
mid int(10) unsigned NOT NULL auto_increment,
-- Header fields.
headers text NOT NULL default '',
-- from_name and subject are encoded in utf-8.
from_address varchar(128) default '',
from_name varchar(128) default '',
subject varchar(128) default '',
msgid varchar(128) NOT NULL default '',
-- The body should be a single piece of HTML, no MIME-encapsulation.
content_type varchar(255) NOT NULL default 'text/html',
body longtext NOT NULL default '',
PRIMARY KEY (mid, msgid)
);

Verified in my database:

mysql> describe og2list_incoming_content;
+--------------+------------------+------+-----+-----------+----------------+
| Field | Type | Null | Key | Default | Extra |
+--------------+------------------+------+-----+-----------+----------------+
| mid | int(10) unsigned | | PRI | NULL | auto_increment |
| headers | text | | | | |
| from_address | varchar(128) | YES | | | |
| from_name | varchar(128) | YES | | | |
| subject | varchar(128) | YES | | | |
| msgid | varchar(128) | | PRI | | |
| content_type | varchar(255) | | | text/html | |
| body | longtext | | | | |
+--------------+------------------+------+-----+-----------+----------------+
8 rows in set (0.02 sec)

However, mail-in.pl makes reference to columns "to_address" and "to_name" (line 267):

$add_content_stmt = < INSERT INTO og2list_incoming_content
(from_address,from_name,to_address,to_name,subject,msgid,content_type,body)
VALUES (?,?,?,?,?,?,?,?);
EOF

og2list.mysql needs to create the proper fields.

Comments

marczak’s picture

Version: 4.7.x-1.x-dev » 4.6.x-1.x-dev

The forum doesn't like that code that I pasted....

...as I was saying, the sql refers to two additional fields:

add_content_stmt = EOF;
INSERT INTO og2list_incoming_content
(from_address,from_name,to_address,to_name,subject,msgid,content_type,body)
VALUES (?,?,?,?,?,?,?,?);
EOF

og2list.mysql needs to be updated in include these fields in the table's creation.

(I can't correct the original post, but I reported the wrong version number: it's og2list running under 4.6)

moshe weitzman’s picture

Project: Organic Groups » Organic groups list manager
Version: 4.6.x-1.x-dev »
Component: OG2list » Code
Amazon’s picture

og2list isn't supported in 4.6. Database is populated automatically in 4.7 with .install file.

Amazon’s picture

Status: Active » Closed (fixed)

4.6 is no longer supported.