Suddenly started getting this error, and subscriptions have stopped being mailed. This error appears at the bottom of every page, and every time I run drush cron. I was able to make the error go away by purging the 561 active items that were stuck in the queue. Now I'm also suddenly getting blank emails for some reason, not sure if this is related.

WD php: PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q.sqid' in 'where clause': SELECT c.cid AS cid, sq.sqid AS _subscriptions_sqid, sq.is_new AS _subscriptions_is_new [error]
FROM
{comment} c
INNER JOIN {subscriptions_queue} sq ON c.cid = sq.load_args
WHERE (c.nid = :db_condition_placeholder_0) AND (sq.uid = :db_condition_placeholder_1) AND (sq.load_function = :db_condition_placeholder_2) AND (q.sqid < :db_condition_placeholder_3)
ORDER BY c.cid ASC; Array
(
[:db_condition_placeholder_0] => 99
[:db_condition_placeholder_1] => 1
[:db_condition_placeholder_2] => subscriptions_content_load_comment
[:db_condition_placeholder_3] => 47
)
in _subscriptions_content_load() (line 61 of /home/killcraft/public_html/sites/all/modules/subscriptions/subscriptions_content.notify.inc).
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'q.sqid' in 'where clause': SELECT c.cid AS cid, sq.sqid AS _subscriptions_sqid, sq.is_new AS _subscriptions_is_new
FROM
{comment} c
INNER JOIN {subscriptions_queue} sq ON c.cid = sq.load_args
WHERE (c.nid = :db_condition_placeholder_0) AND (sq.uid = :db_condition_placeholder_1) AND (sq.load_function = :db_condition_placeholder_2) AND (q.sqid < :db_condition_placeholder_3)
ORDER BY c.cid ASC; Array
(
[:db_condition_placeholder_0] => 99
[:db_condition_placeholder_1] => 1
[:db_condition_placeholder_2] => subscriptions_content_load_comment
[:db_condition_placeholder_3] => 47
)
in _subscriptions_content_load() (line 61 of /home/killcraft/public_html/sites/all/modules/subscriptions/subscriptions_content.notify.inc).
Drush command terminated abnormally due to an unrecoverable error.

Comments

webavant’s picture

Issue summary: View changes

added a little more info

salvis’s picture

Status: Active » Fixed

Fixed in the -dev version (give it up to 12h to be repackaged) — thank you for your report!

Status: Fixed » Closed (fixed)

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

petednz’s picture

Version: 7.x-1.x-dev » 7.x-1.1
Status: Closed (fixed) » Active

Please let me know if you prefer these types to be put in as new issues or not as I suspect the problem is different - but the title of my Issue would have been exactly the same

Note that this site has Domain Access on it hence the 'domain_id' in the error but no idea if this is the cause. Might you be able to whizz out a fix as easily/quickly as above ;-)

The result of this, I assume, is that having run cron nothing is sent and my Subs says "There are 3 active and 0 suspended items in the queue"

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sq.nid' in 'on clause': SELECT c.cid AS cid, sq.sqid AS _subscriptions_sqid, sq.is_new AS _subscriptions_is_new FROM {comment} c INNER JOIN {subscriptions_queue} sq ON c.cid = sq.load_args LEFT OUTER JOIN {domain_access} da ON da.nid = sq.nid WHERE (c.nid = :db_condition_placeholder_0) AND (sq.uid = :db_condition_placeholder_1) AND (sq.load_function = :db_condition_placeholder_2) AND (c.status = :db_condition_placeholder_3) AND (((da.realm = 'domain_id' AND da.gid = :domain_id) OR (da.realm = 'domain_site' AND da.gid = 0))) AND ( EXISTS (SELECT na.nid AS nid FROM {node_access} na WHERE (( (na.gid = :db_condition_placeholder_4) AND (na.realm = :db_condition_placeholder_5) ))AND (na.grant_view >= :db_condition_placeholder_6) AND (c.nid = na.nid) )) ORDER BY c.cid ASC; Array ( [:db_condition_placeholder_0] => 1963 [:db_condition_placeholder_1] => 1518 [:db_condition_placeholder_2] => subscriptions_content_load_comment [:db_condition_placeholder_3] => 1 [:domain_id] => 0 [:db_condition_placeholder_4] => 0 [:db_condition_placeholder_5] => all [:db_condition_placeholder_6] => 1 ) in _subscriptions_content_load() (line 61 of /var/www/www/sites/all/modules/subscriptions/subscriptions_content.notify.inc).

salvis’s picture

Version: 7.x-1.1 » 7.x-1.x-dev
Status: Active » Closed (fixed)

Yes, please open a new issue. Your error message is about sq.nid rather than q.sqid, and Domain Access is definitely involved.

petednz’s picture

jeeps - my eyes really were glazing over at that point weren't they - new issue at http://drupal.org/node/1831666 - thanks for your prompt response

petednz’s picture

Issue summary: View changes

added more info