I just installed the latest dev (great module btw!) and have been having some issues with the stock report. The issue is basically that the page loads forever (I have pretty high php limits on my dev box). Even after minutes of waiting it never completes. I guess that there's some calculation or aggregation that's ineffective or so.
The site that I'm working on is not a clean install, it's a Drupal Commerce site that has been running for over three years and has processed around 10.000 orders and it has around 5.500 products in it.
Oh, and were running Commerce Stock 7.x-2.0.
I don't know if it's related but the log is showing a lot of:
Warning: Cannot use a scalar value as an array i drupal_render()
and
Warning: Invalid argument supplied for foreach() i element_children()
from the stock report page.
Update:
The report rendered after around 20 minutes so it seems that the performance need some tuning.
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | commerce_report-error-views-stock-2395541-6.patch | 1.17 KB | guile2912 |
Comments
Comment #1
adamgerthel commentedComment #2
adamgerthel commentedUpdate: It loaded after around 20 min!
Comment #3
lsolesen commentedSame thing happens for me on discimport.dk.
Comment #4
dpico commentedSame thing here. I'm testing it on a site that has been running for one week, less than 2000 products. The stock report runs out of time before completing.
Comment #5
mglamanOk, so I think the issue is the overall architecture of the Stock module. All that was done was a revision of existing code. I think measures need to be taken to store the data in its own table - like the tax module does. Whenever stock gets adjusted the table will update itself as well.
Comment #6
guile2912 commentedI confirm, takes ages if it does not go time out.
It also fills up my watdog ( this may explain that )
I finnaly managed to fix the problem, and the view is fast , but also works \o/
Give a try to this patch so we can commit it.
Thank you
Comment #7
guile2912 commentedComment #8
guile2912 commentedMarked #2496449: Stock Report gives Invalid argument/Illegal string warnings as duplicate of this issue.
Comment #9
mglamanThanks for patch! Let me review it later, not the fix I'd ultimately want to do for (#5) but definitely want to commit some kind of fix. If users having issues could test patch, too, that'd be great.
Comment #10
zeezhao commentedThanks. Works for me.
Comment #12
mglamanThanks everyone! Especially guile2912 for the patch. Committed.
Comment #14
caco13 commentedI updated Commerce Reporting to
devversion. But The Stock tab continues to wait by server until the 30 seconds expire. Do the patch commited still take a time to get the results from server and I have to extend the maximum script time in server?