Cron email condition weirdness

jimkeane

Member
Hello,

I have built a system to email our students a link to a questionnaire, it contains their details (name, email, etc) and a field to log who had already been emailed, so they don't get emailed again when cron runs again - after new users have been added.

This is on J1.5.25 and F2.1.1 + SVN

I have a condition that checks to see if a user has been emailed:
Code:
return '{email_sent}' == 0;

And an update is set to update that field to 1 when it is processed.
cron_email_issue.jpg


All works well, except when it gets beyond ten rows, then it just stops without any errors.

here is the log:
Code:
 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;

 condition returned false: return '1' == 0;




cronemail
 tableid = 9
SELECT SQL_CALC_FOUND_ROWS DISTINCT `correspondance_log`.`id` AS `correspondance_log___id`, 
 `correspondance_log`.`id` AS `correspondance_log___id_raw`, 
 `correspondance_log`.`date_time` AS `correspondance_log___date_time`, 
 `correspondance_log`.`date_time` AS `correspondance_log___date_time_raw`, 
 `correspondance_log`.`student_number` AS `correspondance_log___student_number`, 
 `correspondance_log`.`student_number` AS `correspondance_log___student_number_raw`, 
 `correspondance_log`.`first_name` AS `correspondance_log___first_name`, 
 `correspondance_log`.`first_name` AS `correspondance_log___first_name_raw`, 
 `correspondance_log`.`family_name` AS `correspondance_log___family_name`, 
 `correspondance_log`.`family_name` AS `correspondance_log___family_name_raw`, 
 `correspondance_log`.`email` AS `correspondance_log___email`, 
 `correspondance_log`.`email` AS `correspondance_log___email_raw`, 
 `correspondance_log`.`email_sent` AS `correspondance_log___email_sent`, 
 `correspondance_log`.`email_sent` AS `correspondance_log___email_sent_raw`, 
 `correspondance_log`.`no_screening` AS `correspondance_log___no_screening`, 
 `correspondance_log`.`no_screening` AS `correspondance_log___no_screening_raw`, 
 `correspondance_log`.`student_number` AS slug, 
 `correspondance_log`.`student_number` AS slug
 , `correspondance_log`.`student_number` AS `__pk_val`
 FROM `correspondance_log` 
    
 ORDER BY `correspondance_log`.`student_number` ASC

Any ideas?

Best wishes,

Jim
 
Hmmm. Sounds like pagination might be kicking in when it shouldn't.

Try setting the pagination on the table to 0 rows (unlimited) and try it.

-- hugh
 
Cheers Hugh, that was it, with Rows per page set to 0 in the tables navigation settings it works.

I'm guessing it shouldn't behave like that?

Jim
 
probably not no :)
We aren't really working on fabrik 2 any more apart from security fixes.
If the table is just used for this then perhaps setting a prefilter would be better than using the cron email condition, it would mean less records are loaded each time the cron is run. Prefilter might look like:

where email_sent != 1
 
I thought I'd fixed that pagination issue with cron plugins in 2.x, but apparently not.

If you need that table to have pagination for display purposes, one option would be to copy the table (in Fabrik), turn pagination off in the copy, and use that for the cron plugin.

You could also then put that pre-filter on the copy, as per Rob's suggestion, without affecting the version you show to the users.

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top