Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I recently noticed I'm suddenly getting the following error. It doesn't appear on every page, and sometimes it shows when I log in, other times it appears to anonymous users:
No new content.
warning: array_fill(): Number of elements must be positive in /[...]/public_html/includes/database.inc on line 253.
warning: implode(): Invalid arguments passed in /[...]/public_html/includes/database.inc on line 253.
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') GROUP BY t1.uid, t1.uaid HAVING COUNT(t2.uid) <= 10 ORDER BY t1.ui' at line 11 query: SELECT t1.uid, t1.uaid as 'uaid', COUNT(*) as 'rows_per_user', t1.timestamp as 'real_date', MIN(t2.timestamp) as 'oldest_date', count(t2.uid) AS 'count' FROM heartbeat_activity AS t1 INNER JOIN heartbeat_activity AS t2 ON t1.uid = t2.uid AND t2.timestamp >= t1.timestamp WHERE (t1.timestamp, t1.uaid) < (t2.timestamp, t2.uaid) AND t1.message_id NOT IN () GROUP BY t1.uid, t1.uaid HAVING COUNT(t2.uid) <= 10 ORDER BY t1.uid, t1.uaid, t1.timestamp DESC in /[...]/public_html/sites/all/modules/heartbeat/heartbeat.module on line 483.
I'm posting this because I've found no other mention of the problem and I don't know where to begin with tracking down a source of the problem.
Thanks in advance.
Comments
Comment #1
Crom CreditAttribution: Crom commentedLooks like a duplicate of this: http://drupal.org/node/1239950
Sorry I can't be more help. I've been living with it for quite a while. I tried and failed to track it down.
Comment #2
NickAT CreditAttribution: NickAT commentedI know this is a several months old but I ran into the same issue. Figured out that it was an initialization problem. I'm using heartbeat.module version 4.12
To fix it, go into heartbeat.module, find line 467, and add a '1' to the array declaration.
See below:
Save the changes to the module, run cron, and then check your logs. Hopefully you should have no more issues.
This seems to be a problem only with people where the 'heartbeat_activity_templates_unlimited' variable is not yet set. This should probably be committed.
I hope this helps others.
Comment #3
Owen Barton CreditAttribution: Owen Barton commentedDuplicate of #1865994: Error on Cron: You have an error in your SQL syntax