The following error is output whenever I create a new post. This has been seen everytime a blog post is created - but I do not believe it is limited to that one content type:

warning: Invalid argument supplied for foreach() in /home/username/public_html/portal/modules/subscriptions/subscriptions.module on line 189.

Grateful for any help/suggestions and of course willing to do whatever is necessary to diagnose/fix/test this issue,

thanks,
Gareth

Comments

salvis’s picture

Status: Active » Closed (duplicate)

Remove the unsupported Privatemsg 2.x and install mail_edit (if you don't have it yet).

gareth_w’s picture

Status: Closed (duplicate) » Active

salvis,

again, thanks for the help on this, and I've finally got round to doing this.

Privatemsg has been reverted and mail_edit has been installed - this did not make the bug go away.

I've also tried to revert subscriptions back to last stable version (1.9) which now gives the error:

user warning: Unknown column 's.stype' in 'field list' query: SELECT td.tid, td.name, n.nid, n.title, s.stype, s.sid FROM ((subscriptions s LEFT JOIN node n ON n.nid = s.sid) LEFT JOIN term_node tn ON tn.nid = s.sid) LEFT JOIN term_data td ON td.tid = tn.tid WHERE n.status = 1 AND s.uid = 1 AND s.stype = 'node' in /home/********/public_html/portal/includes/database.mysql.inc on line 172.
user warning: Unknown column 's.stype' in 'field list' query: SELECT u.uid, u.name, s.stype, s.sid FROM (subscriptions s LEFT JOIN users u ON u.uid = s.sid) WHERE u.status = 1 AND s.uid = 1 AND s.stype = 'blog' in /home/********/public_html/portal/includes/database.mysql.inc on line 172.
user warning: Unknown column 's.uid' in 'where clause' query: SELECT td.tid, td.name FROM subscriptions s INNER JOIN term_data td ON td.tid = s.sid WHERE s.uid = 1 AND s.stype = 'taxa' in /home/********/public_html/portal/includes/database.mysql.inc on line 172.

on all pages :(.

Very grateful if you have any other suggestions on what could be going wrong. I'm happy to use beta test software (it's a development site after all) and do whatever is necessary to chase down the bugs.

Thanks for your continued support,
Gareth

salvis’s picture

What do you mean with "Privatemsg has been reverted"? To what version? Any 2.0-dev version won't work!

The Subscriptions update to 2.0 changes some of the database tables. It saves the old tables, so if you absolutely must go back to 1.9 and preserve the data, then you can restore the old state, but since you say it's a development system, I'd suggest to go forward again to Subscriptions 2.0, deactivate it, uninstall it (admin/build/modules/uninstall) and reinstall the beta version. That way we'll have a clean base to work with...

gareth_w’s picture

Will do with Subscriptions - probably should have done this to start with.

Can I infer from your mail then that No version of PrivateMsg (reverted back to a 1.9? build) is actually working?
Can you recomend an alternative?

Gareth

salvis’s picture

I don't know anything about Privatemsg 1.8 (not 1.9!).

chx started out upgrading both Privatemsg and Subscriptions to 2.0, and I've been somewhat involved in both, on the pmsg side mostly with testing and support. At some point Zen took over pmsg, but it was definitely pre-beta work-in-progress. He did some good work until October 29, but then he apparently got side-tracked. However, Zen has come back yesterday with renewed vigor, so maybe there's hope for Privatemsg.

gareth_w’s picture

Thanks.

Will have to go to subscriptions 2.0 (as recomnded by you, needed for my forum subscriptions) and investigate a different Private Message solution for the time being :(

I hope we can get a stable 5.x version before 6.x comes through!

Thanks again,

Gareth

salvis’s picture

Title: New bug report on create blog » "Invalid argument supplied for foreach()", Privatemsg incompatibility
gareth_w’s picture

I've removed Subscriptions, PrivateMsg and Mail_Edit.

I've resintalled the latest version of Subscriptions (2.0b7) and mail_edit.

On reinstalling subscriptions (the first time this is ticked on in the admin/bulid/modules/ I get the following error:

user warning: Unknown column 'DRUPAL_AUTHENTICATED_RID' in 'field list' query: INSERT INTO subscriptions_user (uid, digest, send_interval, send_updates, send_comments) VALUES(-DRUPAL_AUTHENTICATED_RID, 0, 1, 0, 0) in /home/********/public_html/portal/includes/database.mysql.inc on line 172.

I get no errors in trying to alter the subscriptions module permissions

Now, adding a new comment to an article I get the error:

user warning: Column 'send_comments' in where clause is ambiguous query: INSERT INTO subscriptions_queue (uid, name, mail, language, module, field, value, author_uid, send_interval, digest, last_sent, load_function, load_args) SELECT u.uid, u.name, u.mail, u.language, s.module, s.field, s.value, s.author_uid, s.send_interval, su.digest, su.last_sent, 'subscriptions_content_comment_load', '20' FROM subscriptions s INNER JOIN subscriptions_user su ON s.recipient_uid = su.uid INNER JOIN users u USING(uid) WHERE s.module = 'node' AND s.field = 'nid' AND s.author_uid IN (1, -1) AND send_comments = 1 AND s.value = '9' AND s.recipient_uid != 1 in /home/********/public_html/portal/includes/database.mysql.inc on line 172.
user warning: Column 'send_comments' in where clause is ambiguous query: INSERT INTO subscriptions_queue (uid, name, mail, language, module, field, value, author_uid, send_interval, digest, last_sent, load_function, load_args) SELECT u.uid, u.name, u.mail, u.language, s.module, s.field, s.value, s.author_uid, s.send_interval, su.digest, su.last_sent, 'subscriptions_content_comment_load', '20' FROM subscriptions s INNER JOIN subscriptions_user su ON s.recipient_uid = su.uid INNER JOIN users u USING(uid) WHERE s.module = 'node' AND s.field = 'type' AND s.author_uid IN (1, -1) AND send_comments = 1 AND s.value = 'story' AND s.recipient_uid != 1 in /home/********/public_html/portal/includes/database.mysql.inc on line 172.
user warning: Column 'send_comments' in where clause is ambiguous query: INSERT INTO subscriptions_queue (uid, name, mail, language, module, field, value, author_uid, send_interval, digest, last_sent, load_function, load_args) SELECT u.uid, u.name, u.mail, u.language, s.module, s.field, s.value, s.author_uid, s.send_interval, su.digest, su.last_sent, 'subscriptions_content_comment_load', '20' FROM subscriptions s INNER JOIN subscriptions_user su ON s.recipient_uid = su.uid INNER JOIN users u USING(uid) INNER JOIN term_node t ON s.value = t.tid WHERE s.module = 'node' AND s.field = 'tid' AND s.author_uid IN (1, -1) AND t.nid = 9 AND send_comments = 1 AND s.recipient_uid != 1 in /home/********/public_html/portal/includes/database.mysql.inc on line 172.

I realise I've probably buggered my database with all this faffing, but I would have thought/hoped unistalling these modules would have restored the tables :(

Nevertheless, 2.0b7 is clearly unhappy in my installation. I hope this information is of use to you in fixing the issues.

For now, I am disabling subscriptions and turning PrivateMessage back on instead (was previosuly conflicting).

As before, willing to do anything I can in helping to test this module/make it stable. Grateful if you could let me know when there are more changes to test

Thanks,
Gareth

salvis’s picture

Version: 5.x-2.0-beta4 » 5.x-2.0-beta7

Yes, unfortunately these are two issues with BETA7. There are two patches to fix them:

http://drupal.org/node/170571#comment-673363
http://drupal.org/node/204765

Apply the patches, uninstall Subscriptions (not just disable) and reinstall. Then it should be fine...

salvis’s picture

Version: 5.x-2.0-beta7 » 5.x-2.0-beta10
Category: bug » support
Status: Active » Closed (fixed)

A lot has happened over at Privatemsg, so maybe the situation has improved...

Homeowner One’s picture

Is Privatemsg 'Unsupported' or is this an error in my 'Available Updates' log? So far my members really like the concept of the private messaging module as far as it goes on my community site. I am using 5.X - 2.X dev with subscriptions turned off and am hoping for a rock solid release. Is there anything in the pipline?

salvis’s picture

Is Privatemsg 'Unsupported' or is this an error in my 'Available Updates' log?

That you'd have to ask in the Privatemsg issues queue.

Privatemsg has recently received a new maintainer, but AFAIK it's not even in beta yet, so you have to try for yourself and at your own risk.