PPSubs 4.13 update error

8 replies [Last post]
jaybee
Offline
Joined: 08/14/2009
Status: 
Answered

Hi Leighton - just updated the PPSubs files to 4.13 and run update.php. Got the following error and the update failed....

 

user warning: Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535. You have to change some columns to TEXT or BLOBs query: ALTER TABLE paypal_subscriptions ADD `commission_levels` VARCHAR(256) DEFAULT '' in C:\Development\acquia-drupal-site\acquia-drupal\includes\database.mysql-common.inc on line 298. 

Leighton Whiting
Offline
Joined: 06/02/2009
Jaybee, Thanks for this, I

Jaybee,
Thanks for this, I already caught that error and got an updated version of the module out, but forgot to put it in the distribution. It is in there now though, so please try redownloading. It seems that it is an error with MySQL 4 and older.

Sincerely,
Leighton Whiting

jaybee
Offline
Joined: 08/14/2009
Still a problem...

Hi Leighton,

I downloaded 4.13b and installed - however the update didn't pick up any changes so no database changes occurred.

My modules page shows PayPal Subs at V4.13.

I'm now not sure what the state of the database is - are you able to give me a script that will update the database  (perform the ALTER TABLE that failed) ??

Also, I am running mySQL v5.1.34, so not entirely sure why this affected me if it was an error that affects mySQL 4 and older?

Thanks

Leighton Whiting
Offline
Joined: 06/02/2009
Jaybee, When you run the

Jaybee,
When you run the update.php script, go into the select versions part and choose Paypal Subscriptions 4.13. Since you have already run the update for 4.13, it won't do it again unless you specifically tell it to.
Not sure why you were getting the error, MySQL 5 and up are supposed to support larger VARCHAR row sizes (up to 16 GB), whereas the older ones only support up to 255 bytes. Either way, this update should fix it, since I used TEXT row types instead of VARCHAR for anything over 255 bytes...

Sincerely,
Leighton Whiting

jaybee
Offline
Joined: 08/14/2009
 Leighton - I did try to

 Leighton - I did try to select 413 in the versions dropdown (6407), but the update failed again. I've attached a screengrab showing the error. 

So I can't correct the issue unless I can try to fix the database manually....

 

Ideas?

 

 

EDIT - also attached current table structure FYI

AttachmentSize
error.JPG 61.96 KB
substable.pdf 285.47 KB
jaybee
Offline
Joined: 08/14/2009
 Any ideas Leighton?

 Any ideas Leighton?

Leighton Whiting
Offline
Joined: 06/02/2009
James, Sorry, I must have

James,

Sorry, I must have missed your other post above. I think what is happening here is that the table uses too many large VARCHARs. This has been corrected in previous versions but it looks like since you were one of the first purchasers of this module some of the legacy structure is still there. I have made this SQL query that should bring the database structure up to date. Can you run this in phpMyAdmin or something similar?

After running this, go to update.php and try to run the 4.13 update again, and let me know if it works. Sorry about the hassle...

ALTER TABLE paypal_subscriptions MODIFY description TEXT;
ALTER TABLE paypal_subscriptions MODIFY signup_mail_body TEXT;
ALTER TABLE paypal_subscriptions MODIFY eot_mail_body TEXT;
ALTER TABLE paypal_subscriptions MODIFY cancel_mail_body TEXT;
ALTER TABLE paypal_subscriptions MODIFY modify_mail_body TEXT;
ALTER TABLE paypal_subscriptions MODIFY allow_roles TEXT;

ALTER TABLE paypal_subscriptions MODIFY signup_mail_subject VARCHAR(255);
ALTER TABLE paypal_subscriptions MODIFY eot_mail_subject VARCHAR(255);
ALTER TABLE paypal_subscriptions MODIFY cancel_mail_subject VARCHAR(255);
ALTER TABLE paypal_subscriptions MODIFY modify_mail_subject VARCHAR(255);
ALTER TABLE paypal_subscriptions MODIFY item_name VARCHAR(255);
ALTER TABLE paypal_subscriptions MODIFY business VARCHAR(255);

Sincerely,

Leighton Whiting

jaybee
Offline
Joined: 08/14/2009
Great, thanks!

 Leighton - 

 

Many thanks - that has sorted it

Leighton Whiting
Offline
Joined: 06/02/2009
Jaybee, Glad to hear it. I am

Jaybee,
Glad to hear it. I am planning on releasing a new 4.14 version of Paypal Subscriptions in the next hour or two, which has some cool new features and fixes a few bugs, so be sure to pick it up as well. I'm also releasing a new Paypal Affiliates to support refunds and rejected payments.

Sincerely,
Leighton Whiting

Twitter Feed