After enabling the Activity Stream module I receive the following error:

* warning: Invalid argument supplied for foreach() in /MYSITE/modules/node/node.module on line 561.
* warning: implode() [function.implode]: Invalid arguments passed in /MYSITE/modules/node/node.module on line 565.
* 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 '' at line 1 query: 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 in /MYSITE/includes/database.mysql.inc on line 174.

I had a similar thing happen in the 6.x branch awhile ago, and a fix was issued. I'm wondering if a fix has been found for 5.3 yet? Thanks for the help.

Comments

eidolon night’s picture

Title: SQL erros after Activity Stream install » SQL errors after Activity Stream install

This seems to be the same issue as http://drupal.org/node/299534 but this is a brand spanking new install of 5.3. This issue was supposedly fixed. Am I doing something wrong?

akalsey’s picture

Status: Active » Postponed (maintainer needs more info)

Are you using Postgres or MySQL as your database?

eidolon night’s picture

MYSQL

eidolon night’s picture

Status: Postponed (maintainer needs more info) » Active
mavimo’s picture

Assigned: Unassigned » mavimo
Status: Active » Reviewed & tested by the community

Please change, into activitystream.install files:

  $schema['activitystream_accounts'] = array(
    'fields' => array(
       'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
       'module' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'userid' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'password' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'feed' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'lastfetch' => array('type' => 'datetime', 'not null' => TRUE, 'default' => 0)),
       );

to

  $schema['activitystream_accounts'] = array(
    'fields' => array(
       'uid' => array('type' => 'int', 'unsigned' => TRUE, 'not null' => TRUE, 'default' => 0, 'disp-width' => '10'),
       'module' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'userid' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'password' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'feed' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE),
       'lastfetch' => array('type' => 'datetime', 'not null' => TRUE, 'default' => '0000-00-00 00:00:00')),
       );

Default value for lastfetch (datetime value) is not 0 but '0000-00-00 00:00:00'.

eidolon night’s picture

Just wanted to check in and say that this no longer affects me as I've upgraded to Drupal 6.

dugh’s picture

I don't know if activitystream was updated in the last few weeks, but I don't see a $schema section at all in the activitystream.install file.

And I see the same SQL errors occasionally.

akalsey’s picture

Drupal 5 doesn't use a database scheme, so no $schema section is needed.

If you change the table to set the default for lastfetch to '0000-00-00 00:00:00' do you still see SQL errors?

akalsey’s picture

Status: Reviewed & tested by the community » Closed (fixed)

No recent activity. Closing.