Community Edition : Newletter bug (and my fix)

Talk about anything that doesn't fit in the other catagories :) (and of course is about Group-Office)

Moderator: Developers

pictux
Posts: 44
Joined: Thu Dec 04, 2008 9:02 am

Community Edition : Newletter bug (and my fix)

Postby pictux » Mon Jan 17, 2011 9:54 am

Hi,
i'm using Community Edition version (actually 3.6.17).
First of all, thanks for all the additions done in release 3.6.5.

I've tried to use NewsLetter module, but pressing "Send" button, appears this message:
There was an unexpected problem building the email: Database error: Could not prepare statement SQL: INSERT INTO ml_sendmailing_contacts SELECT DISTINCT ?, contact_id FROM ml_mailing_contacts c INNER JOIN ab_contacts a ON (c.contact_id=a.id) WHERE group_id=? AND email_allowed='1' AND email!='' types:ii params: array ( 0 => 4, 1 => '1', )
MySQL Error: 1052 (Column 'group_id' in where clause is ambiguous)

I've solved myself that error/bug.

I've edited :
<group-office install dir>/modules/mailings/classes/mailings.class.inc.php
at line 386, changed this:
"WHERE group_id=? AND email_allowed='1' AND email!=''";
in
"WHERE c.group_id=? AND email_allowed='1' AND email!=''";

Now NewsLetter works perfectly.
Regards
M
mschering
Site Admin
Site Admin
Posts: 8355
Joined: Tue Apr 20, 2004 1:06 pm
Location: The Netherlands - Den Bosch
Contact:

Re: Community Edition : Newletter bug (and my fix)

Postby mschering » Mon Jan 17, 2011 11:39 am

There shouldn't be a group_id column in the ab_contacts table. Removing that would also fix it.
Best regards,

Merijn Schering
Intermesh

Who is online

Users browsing this forum: No registered users and 2 guests