Closed (fixed)
Project:
Subscriptions
Version:
5.x-2.0-beta4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Dec 2007 at 16:55 UTC
Updated:
22 Dec 2007 at 12:31 UTC
Forgotten "VALUES" on subscriptions.module line 145, it should be in:
case 'insert':
db_query("INSERT INTO {subscriptions_user} VALUES (uid, digest, last_sent) (%d, 0, 0)", $account->uid);
break;
Comments
Comment #1
salvisYes, this is a nasty bug, thanks for reporting it. It's fixed in BETA4.
If you've added any users, you must manually insert those records:
where UID stands for every user that was created (look at the users table) and didn't get a corresponding record in subscriptions_user.
If you don't do this, then Subscriptions will cause more errors for those users!
Comment #2
gustav commentedSalvis, can you clarify who needs to add these entries into the subscriptions_user table? Everyone who upgrades to the new beta and already has users on the site? In that case, shouldn't this be done by the upgrade script?
Comment #3
salvisAdd the entries (see #1) if you have installed any of the beta versions AND added new users between installing that beta and updating to BETA4.
You can simply compare the uid values in the users table and the subscriptions_user table — they should be paired. Since they're added in increasing order, you can simply compare
SELECT MAX(uid) FROM users;with
SELECT MAX(uid) FROM subscriptions_user;If they're the same, you're fine; if not, you need to add records to subscriptions_user to bring it to the level of users.
If you have database prefixes, you need to use them, of course.
Comment #4
gustav commentedThank you, that was very clear and helpful.
Comment #5
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.