Jump to content

Combinations generator fails silently


Recommended Posts

I have a product with a single attribute - colour. This particular product can be one of up to 150 colours. If I use the combination generator to create the set, it works up to about 40 or so colours. If I attempt to add more in one go, it fails silently and returns to the same generator screen (rather than the saved list). I have checked memory limit (128M), turned on errors etc., tried putting traces into the php but can't get anything useful out of it. From when I click on the 'generate these combinations' buttons it just goers quiet on me, then reverts to the same page. It's only generating up to 150 records, so shouldn't need much memory. Any suggestions? Can anyone direct me to the method that should be executing at that point?

 

Thanks.

Link to comment
Share on other sites

Did you try to turn on dev mode in /config/defines.inc.php?

 

Do you have only 1 attribute group?

 

Prestashop should be able to handle 1,000 - 3,000 combinations per product with 128mb ram.

 

You may want to look at the main server apache log (usually accessible from your cpanel) and look for any errors there (try to generate the combination before looking at the log, to get the recent error)

Link to comment
Share on other sites

Yep - dev mode is on but I get no errors shown and the Apache logs show nothing either - just a status of 200 for the adminattributegenerator call via admin/index.php.

There is just one attribute defined - color, so it shouldn't be complicated and should take more than a few kB of text for the SQL - it's just a list of integer value pairs as I understand it.

Stumped!

Could you direct me to the methods/files that actually perform the generation function? I'm quite new to PHP and struggling to trace the execution sequence. I tried putting chrome logger calls into AdminAttributeGeneratorController.php, but only got the init and list reporting - whenever if re-runs index it wipes the console, even though I had used include_once. (any suggestions for getting round that problem might also help!)

Edited by chrised100 (see edit history)
Link to comment
Share on other sites

v 1.5.4.1 new install.

PHP v 5.3.24, MySQL 5.1.70-cll

Configuration Information -> View complains about missing optional param 'magicquotes'

missing file for some modules (wishlist / mailing options) that I don't think are relevant

The only manual changes are where I've added diagnostics -

admin/index.php, (included ChromePHP.php)

config.inc.php, (not changed manually since the installation)

defines.inc.php (it installed with dev mode = true - not actually changed by me directly)

AdminAttributeGeneratorController.php - added diagnostics. Reverting to the original shows the same problem.

Link to comment
Share on other sites

It must be something to do with your server.

 

The next thing I would try would be to manually add those combinations.

 

That would let us know if the problem is with the generator, or with the number of combinations.

Link to comment
Share on other sites

v 1.5.4.1 new install.

PHP v 5.3.24, MySQL 5.1.70-cll

Configuration Information -> View complains about missing optional param 'magicquotes'

missing file for some modules (wishlist / mailing options) that I don't think are relevant

The only manual changes are where I've added diagnostics -

admin/index.php, (included ChromePHP.php)

config.inc.php, (not changed manually since the installation)

defines.inc.php (it installed with dev mode = true - not actually changed by me directly)

AdminAttributeGeneratorController.php - added diagnostics. Reverting to the original shows the same problem.

 

Hi, could you check your php.ini file and tell me what the values are under

 

max_input_time = [Maximum amount of time each script can wait for requested data, in seconds]

max_execution_time = [Maximum allowed execution time of each script, in seconds.]

Link to comment
Share on other sites

So I tried adding in batches, got up to a total of 121 combinations and the combination generator then refused to add even one more.

Manually adding the 122nd combination (i.e. clicking 'New Combination' rather than 'Product combinations generator') lets me add more.

If I then use the generator just to change the default quantity (without adding or removing any combinations) it fails.

Something is constraining the attribute generator at 121 rows but I can't find it.

Edited by chrised100 (see edit history)
Link to comment
Share on other sites

max_input_vars fixed it!

Many thanks to everyone.

For the unitiated (like me) I simply created a php.ini file at the top level (in this case the admin folder) and put the line:

max_input_vars = 2000

 

(Previous checks using phpinfo.php reported it as 1000)

I can now add up to 240 colors, which whill keep me happy for a while!

 

Thanks again - brilliant to have such an active and supportive forum.

 

P.S. this article helped explain it: http://techtalk.virendrachandak.com/big-forms-and-php-max_input_vars/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...