4 replies [Last post]
zeroxx1986's picture
Offline
Joined: 01/06/2012
Juice: 13
Was this information Helpful?

Hi there!

I've found a problem regarding this module. When you have two or more options assigned to a product, with each option consisting of 100+ attributes (yes, it is left and right eye dioptre, and is needed, the attributes range from -20.00 to +20.00 in 0.25 increments, that sums up to 2*161 options.) the options page at a specific product's page (where you further filter the available options for that specific product) doesn't work. No matter what is selected and what is not, it always reverts back to the default - everything selected - state.

If I only assign one attribute from the two, then the filtering works. After that, enabling the second attribute again corrupts the filtering, but it will revert to the state when only one attribute was assigned to the product.

zeroxx1986's picture
Offline
Joined: 01/06/2012
Juice: 13
Re: Bug within Ubercart Product attributes v7.x-3.0-rc3

Okay so I've managed to track the problem down a bit:

1. When there are only a few attributes and options, the "uc_object_options_form_validate" and "uc_object_options_form_submit" methods both get called and they run and finish (They reside in the "us_attribute.admin.inc" file).
2. When there are many more attributes and options, the mentioned methods won't get called, thus won't run.

(I've tested it with PHP's die() function.)

Could it be a Drupal bug then?

zeroxx1986's picture
Offline
Joined: 01/06/2012
Juice: 13
Re: Re: Bug within Ubercart Product attributes v7.x-3.0-rc3

- I forgot to mention (but you can guess this by reading the version number of the module) but I use Drupal 7.10.

zeroxx1986's picture
Offline
Joined: 01/06/2012
Juice: 13
Re: Bug within Ubercart Product attributes v7.x-3.0-rc3

Further digging into the problem, I've tried a new drupal instance on my server at home, which runs windows. Everything was up to date: Drupal, Ubercart, related modules; and was exactly the same as on the main server which runs linux.
The bottom line: this problem didn't occur on my server, everything worked exactly as it should. This rolls the problem over to the apache / php installation on the server which I'm using.
Nevertheless, if I may suggest, the ubercart's option management page should be split into separate parts, the parts should be all subpages where only one attribute's options can be managed.
I'm trying to contact my server provider for further assistance, and will post the resolution for this problem if it will be cleared.

zeroxx1986's picture
Offline
Joined: 01/06/2012
Juice: 13
Re: Bug within Ubercart Product attributes v7.x-3.0-rc3 - SOLVED

I've managed to solve this problem. Turns out this wasn't ubercart's, nor drupal's fault. The problem was with a PHP extension named Suhoshin. This is a security extension which limits certain POST and REQUEST messages.
In order to overcome this, you need to create an unmodified php.ini (the default php.ini which you currently use) file in your drupal root directory, and add the following lines below everything:

suhosin.request.max_array_depth=4096
suhosin.request.max_array_index_length=2048
suhosin.request.max_name_length=2048
suhosin.request.max_value_length=650000
suhosin.request.max_vars=4096
suhosin.post.max_array_depth=8048
suhosin.post.max_array_index_length=1024
suhosin.post.max_name_length=2048
suhosin.post.max_totalname_length=8048
suhosin.post.max_vars=4096

If the problem still occurs, just increase these values.