Hi,
I use the shoutbox module on a block and on a page and it goes well.
In my "recent log messages" I get an error message everytime cron is running.

PDOException: SQLSTATE[42000]: Syntax error or access violation: 1064 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 'FROM shoutbox s WHERE (s.created < '1307347830')' at line 1: SELECT FROM {shoutbox} s WHERE (s.created < :db_condition_placeholder_0) ; Array ( [:db_condition_placeholder_0] => 1307347830 ) in shoutbox_cron() (line 133 of /var/www/virtual/MY_URL/MY_SUBDOMAIN/htdocs/sites/all/modules/shoutbox/shoutbox.module).

Is this a bug or a false config for shoutbox or cron?

rappelkiste_src

CommentFileSizeAuthor
#5 addfieldlist-1617488-4.patch610 bytesjustdave
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Taxoman’s picture

I just enabled 7.x-1.0-alpha2 on a web site with many other modules, but not using JavaScript aggregation, and cron runs fine without errors. (Drupal 7.14 / PHP 5.3.10). I am not using auto-updates in Shoutbox, though.

rappelkiste_src’s picture

Hi Taxoman,

I use shoutbox 7.x-1.0-alpha2, too. Auto-refresh for the Shoutbox is set to "0". Javascript aggregation is off.
The error message from my first post comes up by every run of cron. Drupal ist in 7.14.

Any other tipps?

rappelkiste_src

justdave’s picture

I'm using 7.x-1.2 and getting this also.

justdave’s picture

Did a little troubleshooting and found the error. It's in the code that prunes expired shouts if you have expiration enabled. The db_select() call is failing to specify which fields it's intending to retrieve (which is why the SQL syntax error since you're essentially doing "SELECT FROM" instead of "SELECT {fieldlist} FROM" or equivalent.

I'll have a patch coming as soon as I get a shout to expire so I can make sure it actually works.

justdave’s picture

FileSize
610 bytes
justdave’s picture

Status: Active » Needs review
rappelkiste_src’s picture

Hello justdave,
thanks for the patch.
Unfortunately, I can still not install a patch.
That's on my list, just behind the point to get learn better English. :-)
Sorry I can therefore give no return info, today.

floppy’s picture

Hi Justdave,

The patch from #5 (i.e. my implementation by simple editing the file, adding the missing line) worked fine for me. Cron no longer gives the PDOException. Thanks, and for the first time old shouts got removed too!

rappelkiste_src’s picture

After a long time, I apply the patch and the messages from the first post is gone.
Everything works fine.
Thank you very much for your module and support.

Plazik’s picture

Patch #5 works for me too. Thanks.

rv0’s picture

Issue summary: View changes

#5 working fine.. this should be committed.

justdave’s picture

I filed https://drupal.org/node/2207965 a couple days ago completely forgetting about this bug. Yeah, the bug is still here, and this patch still fixes it.

justdave’s picture

Status: Needs review » Reviewed & tested by the community
Issue tags: +cron error

we have multiple people reporting the patch works, so setting as reviewed

vitalblue’s picture

Status: Reviewed & tested by the community » Fixed

Patch applied and works.
Please check new version 7.x-1.0-alpha4

Thanks all for your help

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.