4.11 problem

16 replies [Last post]
damien
Offline
Joined: 09/08/2009
Status: 
Answered

 I just installed 4.11 and got the following error when I tried to save a subscription type

 

"user warning: Unknown column 'allow_roles' in 'field list' query: INSERT INTO paypal_subscriptions (item_name, description, business, return_url, cancel_return, notify_url, currency_code, a1, p1, t1, a2, p2, t2, a3, p3, t3, src, sra, srt, rid, signup_mail_subject, signup_mail_body, eot_mail_subject, eot_mail_body, cancel_mail_subject, cancel_mail_body, modify_mail_subject, modify_mail_body, page_style, allow_roles, block_when, remove_when, user_types_url) VALUES .....   etc "

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, Can you confirm

Damien,
Can you confirm whether you ran update.php?

Sincerely,
Leighton

damien
Offline
Joined: 09/08/2009
 Yes I did run

 Yes I did run update.php

 

I'll do it again though and see what happens

 

damien
Offline
Joined: 09/08/2009
 Still no good   user

 Still no good

 

 

user warning: Unknown column 'allow_roles' in 'field list' query: INSERT INTO paypal_subscriptions (item_name, description, business, return_url, cancel_return, notify_url, currency_code, a1, p1, t1, a2, p2, t2, a3, p3, t3, src, sra, srt, rid, signup_mail_subject, signup_mail_body, eot_mail_subject, eot_mail_body, cancel_mail_subject, cancel_mail_body, modify_mail_subject, modify_mail_body, page_style, allow_roles, block_when, remove_when, user_types_url) VALUES ('Membership','$30 - for membership','sales@mydomain.com','','','','USD','','','','','','','30.00','2','D',1,0,0,3,'Thank you for Signing Up, [firstName]!','<p>Dear [firstName] [lastName], You have purchased the [subscriptionName] subscription for [amount] on [date], and have been granted the [roleName] role. Thank you! Sincerely, Site Admin</p>','[firstName], your Subscription has ended','<p>Dear [firstName] [lastName], Your [subscriptionName] subscription has expired or been cancelled. The [roleName] role has been removed. Sincerely, Site Admin</p>','Subscription Cancelled','<p>Dear [firstName] [lastName], Your [subscriptionName] subscription has been cancelled and will not automatically renew anymore. The [roleName] role will be removed at the end of the term. Sincerely, Site Admin</p>', 'Subscription Modified','<p>Dear [firstName] [lastName], Your subscription has been successfully modified. Sincerely, Site Admin</p>','','a:3:{i:2;i:2;i:1;i:0;i:3;i:0;}','','subscr_eot','') in /home/doma79/public_html/thenxtclassroom.com/modules/paypal/paypal_subscriptions/paypal_subscriptions.module on line 2404.

These are the subscriptions:

No Subscription Plans - Use the 'Add Subscription' Link to Add Plans

 

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, Very strange. The

Damien,
Very strange. The .install file was supposed to add a new field 'allow_roles' to the table, but it seems like it failed somehow for you. Can you try running update.php, but instead of using the default settings, go to 'Select Versions' and set the version for Paypal Subscriptions to 6406? Let me know if you see any errors.

Sincerely,
Leighton

damien
Offline
Joined: 09/08/2009
 The update wasn't successful

 The update wasn't successful for version 6406

 

 user warning: Duplicate column name 'start_date' query: ALTER TABLE paypal_user_subscriptions ADD `start_date` INT NOT NULL DEFAULT 0 in /home/..................../includes/database.mysql-common.inc on line 298.user warning: Duplicate column name 'current_payments' query: ALTER TABLE paypal_user_subscriptions ADD `current_payments` INT DEFAULT NULL in /home/......................./includes/database.mysql-common.inc on line 298.user warning: Duplicate column name 'max_payments' query: ALTER TABLE paypal_user_subscriptions ADD `max_payments` INT DEFAULT NULL in /home/................../includes/database.mysql-common.inc on line 298.

Updates were attempted. If you see no failures below, you may proceed happily to the administration pages. Otherwise, you may need to update your database manually. All errors have been logged.

Main page

Administration pages

The following queries were executed paypal_subscriptions module Update #6406

Failed: ALTER TABLE {paypal_user_subscriptions} ADD `start_date` INT NOT NULL DEFAULT 0

ALTER TABLE {paypal_subscriptions} ADD `allow_roles` VARCHAR(2048) DEFAULT 'a:0:{}'

ALTER TABLE {paypal_subscriptions} ADD `user_types_url` VARCHAR(128) DEFAULT ''

ALTER TABLE {paypal_subscriptions} ADD `block_when` VARCHAR(32) DEFAULT ''

ALTER TABLE {paypal_subscriptions} ADD `remove_when` VARCHAR(32) DEFAULT 'subscr_eot'

Failed: ALTER TABLE {paypal_user_subscriptions} ADD `current_payments` INT DEFAULT NULL

ALTER TABLE {paypal_user_subscriptions} CHANGE `current_payments` `current_payments` INT NOT NULL

Failed: ALTER TABLE {paypal_user_subscriptions} ADD `max_payments` INT DEFAULT NULL

ALTER TABLE {paypal_user_subscriptions} CHANGE `max_payments` `max_payments` INT NOT NULL

 

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, Sorry about this, I

Damien,
Sorry about this, I realize now what happened, I had a ')' in the wrong place. Please redownload the module and try reinstalling. Sorry for any inconvenience. Let me know if it works.

Sincerely,
Leighton Whiting

damien
Offline
Joined: 09/08/2009
 It's always a ')' or a ';'

 It's always a ')' or a ';' isn't it :)

 

Seems to be working now, only I still can't get it to automatically log in after you 'return to merchant' :(

 

Can you give me a dummies guide to what I need to setup?

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, For auto-login to

Damien,
For auto-login to work properly, the 'Automatically Log In New Users' option should be checked in the settings page for Paypal Subscriptions in 'Site Configuration' -> 'Paypal Subscriptions Settings'. Just have to say that before we go further. Next step, once you have confirmed that is on, can you check the log and see if there were any errors reported? Also, what is set for the 'Success Page' field for the Subscription in the Advanced Settings area? Thanks

-Leighton

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, I think what may be

Damien,
I think what may be happening is the IPN from Paypal is taking too long to reach the server. The auto-login won't log the user in until payment is confirmed. I made some changes to the script to double the timeout and also added an error log which will alert you if the thank you page times out and Auto Login fails.
Redownload and try it now and let me know if it works for you. You don't need to reinstall, just upload the paypal_subscriptions.module file and overwrite the old one, since that was the only file that was changed.

Sincerely,
Leighton

damien
Offline
Joined: 09/08/2009
 I have nothing set in the

 I have nothing set in the Success Page, as I was following the following

 

Automatically Login New users?

"This option will only work if the default thank-you page is used."

 

Should I create a separate 'success page'?

 

cheers

damo

 

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, No, it should work

Damien,
No, it should work with any page, I was just curious what it was set to. I think my new changes should fix it, can you try them?

-Leighton

damien
Offline
Joined: 09/08/2009
 No luck.  It just goes back

 No luck.  It just goes back to the home page.  If I enter my newly created login details it is fine, but it won't auto log me in

 

Edit - Actually this new user didn't successfully pay, but managed to be given the role permission anyway??

Leighton Whiting
Offline
Joined: 06/02/2009
Damien, It all sounds really

Damien,
It all sounds really strange, is there any way that you could send me the site and create me an account on your site with admin privileges so I can test this myself and see the logs?

Sincerely,
Leighton

damien
Offline
Joined: 09/08/2009
 Account created and sent to

 Account created and sent to your gmail

 

Thanks so much for your help, I really appreciate it.

 

cheers

damo

 

Leighton Whiting
Offline
Joined: 06/02/2009
No problem, we'll get the

No problem, we'll get the problem fixed, whatever it may be.

Sincerely,
Leighton

Leighton Whiting
Offline
Joined: 06/02/2009
SMF Forum = Problem

Damien,
I am pretty sure I have found the problem. It is the SMF Forum module. It is overriding the default registration process, and creating the user rather than using drupal's default method. In addition, it is logging out the user once he/she goes to the thankyou page, that is why the auto login is not working and it is going to the home page. It also explains why the user account gets created even if the payment is not successful. Basically, this module is not going to be compatible with Paypal Subscriptions' Paid Registration feature. You can still use the upgrade membership feature, allowing users to register for free but only get the member role once they upgrade their membership. Or you can disable the SMF forum module and use a different module for forums (advanced forums is a good one, it is the one I use on this site). Sorry about that, but there really isn't any way around it because of the way that SMF forum works.

Sincerely,
Leighton Whiting

Twitter Feed