HI,

After installing the Subscriptions module I receive the below error when posting a new comment. The comment is successfully posted the subscription emails are not sent.


* user warning: Unknown column 'Object' in 'where clause' query: SELECT u.mail, u.name, u.uid, u.language FROM users u INNER JOIN subscriptions s ON u.uid = s.uid INNER JOIN subscriptions_sent ss ON u.uid = ss.uid WHERE s.send_interval = 0 AND u.status= 1 AND s.sid = Object AND stype = 'taxa' in /home/webadmin/allhonours.ie/html/beta/includes/database.mysql.inc on line 172.
* user warning: Unknown column 'Object' in 'where clause' query: SELECT name FROM term_data WHERE tid = Object in /home/webadmin/allhonours.ie/html/beta/includes/database.mysql.inc on line 172.

Any ideas?

Many thanks,

Patrick

Comments

salvis’s picture

I can't reproduce this. Do you have the current Subscriptions and Privatemsg 2.x-dev snapshots installed?

You don't need to enable the Privatemsg module, but you need to enable the Mail Editor module which (at this point) comes with Privatemsg.

PBarry-1’s picture

Status: Active » Closed (fixed)

Hey,

Thanks for the reply. I never pin pointed the problem but I solved it by removing unused modules and reinstalled the Privatemsg 5.x-1.8 and Subscriptions 5.x-1.9.

Thanks.

Patrick

salvis’s picture

Ok, thanks for getting back and closing!

McPille’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Active

Hi I have also a SQL problem with my site together the subscription module. The SQL-errors even remains during cron even after deleting all comments and content on the site.

There are 3 errors connected to the problem. These 3 errors repeat serveral times in the log before the cron run complete message.

1.
Invalid argument supplied for foreach() in C:\......\drupal\modules\node\node.module in Zeile 521.

2.
implode() [function.implode]: Bad arguments. in C:\......\drupal\modules\node\node.module in Zeile 525.

3.
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 C:\......\drupal\includes\database.mysql.inc in Zeile 172.

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.

The module seems to work fine. All users who are subscribed seem to get there notification mails. But still, those error messages are nasty.

I use:
privatemsg : 5.x-2.x-dev (2007-Sep-16)
subscription : 5.x-2.x-dev (2007-Sep-15)
Drupal: 5.2
Apache/2.2.4 (Win32); PHP/5.2.3

I have no experience in tracking down errors in drupal. Is there any log where I shall start locking for the cause? Are there any helpful logs or options maybe in myphpadmin, apache or else, which might help you?

Many thanks in advance…
Andreas

nobody1225’s picture

Hi
I have the same problem

1. warning: Invalid argument supplied for foreach() in C:\AppServ\www\aaa\modules\node\node.module on line 504.
2. warning: implode() [function.implode]: Bad arguments. in C:\AppServ\www\aaa\modules\node\node.module on line 508.
3. 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 C:\AppServ\www\aaa\includes\database.mysql.inc on line 172.

I use :
subscriptions 5.x-2.x-dev July 19, 2007 - 14:11
privatemsg 5.x-2.x-dev July 19, 2007 - 13:59
Drupal 5.1
MySQL 5.0.27
PHP 5.2.1

thank you very much.

salvis’s picture

#4:

privatemsg : 5.x-2.x-dev (2007-Sep-16)
subscription : 5.x-2.x-dev (2007-Sep-15)

Are you really sure about these dates? What are the version numbers inside the .module files?

#5:

subscriptions 5.x-2.x-dev July 19, 2007 - 14:11
privatemsg 5.x-2.x-dev July 19, 2007 - 13:59

These are definitely outdated.

salvis’s picture

Just for the record: The 'foreach' issue was discussed and fixed in http://drupal.org/node/174866.

I think the 'implode' issue is even older, and it's only downhill from there, of course.

So, please do get the current development snapshots of subscriptions AND privatemsg, and run the database update if needed.

nobody1225’s picture

sorry,
subscriptions 5.x-2.x-dev (Last updated: September 15, 2007 - 00:08)
privatemsg 5.x-2.x-dev (Last updated: October 2, 2007 - 00:05)
thank you very much.

salvis’s picture

Status: Active » Closed (fixed)

Ok, let's take a step back. I was a bit irritated because #4 reactivated an old unrelated issue rather than creating a new one, and this kept me from looking closely at what he wrote. I'm sorry about that...

I've opened a new issue under http://drupal.org/node/180529 — let's continue there...