5 replies [Last post]
bsenftner's picture
Offline
Joined: 07/09/2009
Juice: 107
Was this information Helpful?

Is there any documented method to downgrade from 2.3 to 2.2?

I waited to upgrade, looking to see if there where any bug reports about file downloads breaking (or other issues) before moving from a perfectly fine 2.2 (for my purposes) version to 2.3.

Having just upgraded, and stupidly moved that upgrade to my live site after some minor testing... I think I may be screwed and need to reinstall from scratch.

I never though that something so fundamental as file download features could break, so I did not bother testing that. Yes, my bad. However, how did this get released?!?!?!?!

My installation:
Pressflow 6.16 (Drupal optimized for high traffic sites)

Many of the usual modules, like imagecache, lightbox, Services, Views, Panels, Token... only the essentials really, I'm not into loading lots of modules.

Edit: more information

I'm adding my products to the cart with a cart link. Each product has multiple options, as different skus for each option, and with a different file download associated with each sku.
When adding a product to the cart, the "cart links message" reports the default sku being added to the cart, and not the specific sku associated with the specific option the customer selected.
Could that be the problem? I would expect that the "cart links message" would report the specific sku... perhaps the file download feature logic is looking for a file download associated with the default sku and not the option's sku?

My cart links look like this, just in case I've got that wrong: (worked fine before with UC 2.2):
[my site's address]/cart/add/p655_q1_a1o1?destination=node/655

bsenftner's picture
Offline
Joined: 07/09/2009
Juice: 107
Re: After upgrading to Ubercart 6.x-2.3, file download features

More information: if I don't use cart links, but the default 'add to cart' widgets and buttons, then file download features work.

Having a look at the cart links source, I don't see how they could ever have worked.

Actually, from reading cart links source, cart links does not work for any product with custom skus based off attribute options. (UC 2.3)
I know there's a cart links security upgrade... nice if that fixed it... will report back...

bsenftner's picture
Offline
Joined: 07/09/2009
Juice: 107
found nasty bug in uc_cart_links.pages.inc

At appears that there's a nasty bug in uc_cart_links.pages.inc that causes any product purchased with a cart link to only assign the default SKU to the cart, and not the specific sku associated with an attribute/option combination.

The bug is near line 73 of uc_cart_links.pages.inc. This code fragment explains:

            case 'a':
            case 'A':
              $attribute = intval(drupal_substr($part, 1, stripos($part, 'o') - 1));
              $option = (string) drupal_substr($part, stripos($part, 'o') + 1);
              // Multiple options for this attribute implies checkbox
              // attribute, which we must store as an array. However, all other
              // types can be stored as arrays as well.
              //
              // Blake mod: Aug-14-2010
              // seems to fix download file product links with attributes:
              // $p['attributes'][$attribute][$option] = $option;
              $p['data']['attributes'][$attribute] = $option;
              break;

I believe this fixes a whole class of issues with cart_links...! Previously, any products with attribute/option info specified in the cart link was being lost when the purchase info was passed to uc_cart_add_item()!

wuh
wuh's picture
Offline
Joined: 06/06/2009
Juice: 48
Re: found nasty bug in uc_cart_links.pages.inc

I had the exact same problem as described by bsenftner above - I can confirm that this change in uc_cart_links.pages.inc fixes the issue.

Please commit.

Thank you bsenftner.

ryanschmidt's picture
Offline
Joined: 11/17/2008
Juice: 235
Re: [solved] After upgrading to Ubercart 6.x-2.3, file download

Thank you so much for this post! It just saved my day.

Slim Grin's picture
Offline
Joined: 04/24/2011
Juice: 5
Thanks!

This has been making me crazy for 2 days. I first thought is was a problem with Conditional Actions until I saw the SKU wasn't being passed with the custom links - which is all my store uses.

Last detail solved. I can now publish my site!