After create a campaing and click to process the queue, only send to 12 users … why the others are just ignored and no error or log about is displayed?
I m using API to add users to system.
By default, API not send ‘disabled’ => 0, and its completed as NULL value.
Once disabled has NULL, query could’nt be executed correcty due !u.disabled.
Or change API to send disable = 0 or change MySQL database to remove NULL from disabled field.
//# if the above didn't find any, run the normal search (again)
if (empty($queued)) {
//# remove pre-queued messages, otherwise they wouldn't go out
Sql_Query(sprintf('delete from '.$tables['usermessage'].' where messageid = %d and status = "todo"',
$messageid));
$removed = Sql_Affected_Rows();
if ($removed) {
cl_output('removed pre-queued subscribers '.$removed, 0, 'progress');
}
$query = sprintf('select distinct u.id from %s as listuser
inner join %s as u ON u.id = listuser.userid
inner join %s as listmessage ON listuser.listid = listmessage.listid
left join %s as um ON (um.messageid = %d and um.userid = listuser.userid)
where
listmessage.messageid = %d
and listmessage.listid = listuser.listid
and u.id = listuser.userid
and um.userid IS NULL
and u.confirmed and !u.blacklisted and !u.disabled
%s %s',
$tables['listuser'],
$tables['user'],
$tables['listmessage'],
$tables['usermessage'],
$messageid, $messageid,
$exclusion, $user_attribute_query
);
}
Great that you found the cause and a solution. Which version of the API are you using (link)? If it’s in the REST API v2 (for phpList 4) then this should be fixed soon.