I'm starting a new thread here for an issue that was erroneously appended to an old unrelated issue. Two users have independently reported it:

The foreach() error is followed by two aftereffects:

  • implode() [function.implode]: Bad arguments
  • SQL Syntax error in
    SELECT n.nid, n.vid, n.type, n.status, n.created, n.changed, n.comment, n.promote, n.sticky, r.timestamp AS revision_timestamp, r.title, r.body, r.teaser, r.log, r.format, u.uid, u.name, u.picture, u.data FROM node n INNER JOIN users u ON u.uid = n.uid INNER JOIN node_revisions r ON r.vid = n.vid WHERE
    (note the empty WHERE clause)

It's this code inside node_load(), node.module, called from cron:

    // Turn the conditions into a query.
    foreach ($param as $key => $value) {
      $cond[] = 'n.'. db_escape_string($key) ." = '%s'";
      $arguments[] = $value;
    }
    $cond = implode(' AND ', $cond);
The SQL-errors even remains during cron even after deleting all comments and content on the site.

The errors during cron disappear if i disable the subsriptions module. But initially after the first enabling of the subscription module there were no errors. There start a few days ago.

This is nasty! I don't know how to reproduce it here — any ideas on how to tackle this, chx?

Comments

skizzo’s picture

I confirm the problem on D52, Subscriptions 15 Sep, PrivMsg 16 Sep.
Trying to upgrade to PrivMsg 2 Oct I get the following error for Update #6:
Other actions ALTER TABLE {users} and UPDATE {users} are ok.
Maybe it is just an issue with mySql permission settings, but I never saw this before.


# user warning: Access denied; you need the SUPER privilege for this operation query: CREATE TRIGGER user_name_length_insert BEFORE INSERT ON users FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name) in /var/www/cms50/includes/database.mysql.inc on line 172.

salvis’s picture

Please, please, please do not mix issues!

That other issue is discussed in http://drupal.org/node/180549.

McPille’s picture

Status: Active » Fixed

Hi,

I tried the new October versions of privatemsg and subscriptions and the errormessages during the cron runs have disapeared.

Thank you very much for fixing the problem that fast!!!!

Andreas

P.S. Sorry for mixing up the problems in the first place. I thought the SQL problems were somehow related. My fault, I should have read more carefully.

Anonymous’s picture

Status: Fixed » Closed (fixed)
Saganesque’s picture

Version: » 5.x-2.2

Subscribing

salvis’s picture

Version: 5.x-2.2 » 5.x-2.0-beta2

This issue is obsolete. There's no point in "subscribing" and bumping the version number.

Create a new issue, if you have a problem with the current version.