Charl Beetge 2 Posted April 18, 2020 Report Share Posted April 18, 2020 Hi I'm getting a error 500 when trying to run a summation report; the error message reads "count(): Parameter must be an array or an object that implements Countable". None of the old saved summation reports work and I cannot create a new summation report. All other reports work, saved and new. Is there a way of knowing which field/parameter/object it is that's not an array or countable? Not sure if upgrading to ver 8.0 changed something or if there is an error with one of my fields; I've not created any new fields in the db. I checked in the database tables and cannot find a missing value in a table or any other non-numerical value in any of the fields. UPDATE - I created a new subdomain and installed a new 7.1 system, then did an upgrade to version 8, brand new system with no new fields and only two contact records, getting the same error. Is anybody else getting an error on the summation reports? Thank you Charl Quote Link to post Share on other sites
jack 30 Posted April 20, 2020 Report Share Posted April 20, 2020 Can you please upload the stack trace and photo of the report you are trying to run Quote Link to post Share on other sites
Charl Beetge 2 Posted April 21, 2020 Author Report Share Posted April 21, 2020 Hi Jack I cannot open any of the saved summation reports so it's not a specific summation report. It is also when I try and create a new summation report. When I click and open the reports module and have the report types top left, I click on the Summation Report to create a new report, the window opens but the circle keeps on turning as if it's not loading; I then click on INSPECT, get 1x error in the console section; I click on the error and see the Error 500 message with the following lines - Error Code: 500Error Message: count(): Parameter must be an array or an object that implements CountableStack Trace: [click to toggle display]PHP warning in /home/contactzco/public_html/agrinc/protected/modules/reports/components/SummationReportGridView.php(108)#0 /home/contactzco/public_html/agrinc/framework/zii/widgets/grid/CGridView.php(363): SummationReportGridView->initColumns()#1 /home/contactzco/public_html/agrinc/protected/components/X2GridView/X2GridViewBase.php(598): SummationReportGridView->init()#2 /home/contactzco/public_html/agrinc/framework/web/CBaseController.php(147): SummationReportGridView->init()#3 /home/contactzco/public_html/agrinc/protected/controllers/x2base.php(836): ReportsController->createWidget()#4 /home/contactzco/public_html/agrinc/protected/modules/reports/components/reports/views/_summationReport.php(53): ReportsController->widget()#5 /home/contactzco/public_html/agrinc/framework/web/CBaseController.php(126): require()#6 /home/contactzco/public_html/agrinc/framework/web/CBaseController.php(95): ReportsController->renderInternal()#7 /home/contactzco/public_html/agrinc/framework/web/CController.php(872): ReportsController->renderFile()#8 /home/contactzco/public_html/agrinc/protected/modules/reports/components/reports/X2SummationReport.php(328): ReportsController->renderPartial()#9 /home/contactzco/public_html/agrinc/protected/modules/reports/components/reports/X2SummationReport.php(161): X2SummationReport->generate()#10 /home/contactzco/public_html/agrinc/protected/controllers/x2base.php(824): X2SummationReport->run()#11 /home/contactzco/public_html/agrinc/protected/modules/reports/controllers/ReportsController.php(735): ReportsController->widget()#12 /home/contactzco/public_html/agrinc/protected/modules/reports/controllers/ReportsController.php(748): ReportsController->generate()#13 unknown(0): ReportsController->actionSummationReport()#14 /home/contactzco/public_html/agrinc/framework/web/actions/CAction.php(109): ReflectionMethod->invokeArgs()#15 /home/contactzco/public_html/agrinc/framework/web/actions/CInlineAction.php(47): CInlineAction->runWithParamsInternal()#16 /home/contactzco/public_html/agrinc/framework/web/CController.php(308): CInlineAction->runWithParams()#17 /home/contactzco/public_html/agrinc/framework/web/filters/CFilterChain.php(134): ReportsController->runAction()#18 /home/contactzco/public_html/agrinc/protected/controllers/x2base.php(586): CFilterChain->run()#19 /home/contactzco/public_html/agrinc/framework/web/filters/CInlineFilter.php(58): ReportsController->filterSetPortlets()#20 /home/contactzco/public_html/agrinc/framework/web/filters/CFilterChain.php(131): CInlineFilter->filter()#21 /home/contactzco/public_html/agrinc/framework/web/filters/CFilter.php(40): CFilterChain->run()#22 /home/contactzco/public_html/agrinc/framework/web/filters/CFilterChain.php(131): FileUploadsFilter->filter()#23 /home/contactzco/public_html/agrinc/framework/web/filters/CFilter.php(40): CFilterChain->run()#24 /home/contactzco/public_html/agrinc/framework/web/filters/CFilterChain.php(131): X2AjaxHandlerFilter->filter()#25 /home/contactzco/public_html/agrinc/framework/web/CController.php(291): CFilterChain->run()#26 /home/contactzco/public_html/agrinc/framework/web/CController.php(265): ReportsController->runActionWithFilters()#27 /home/contactzco/public_html/agrinc/framework/web/CWebApplication.php(282): ReportsController->run()#28 /home/contactzco/public_html/agrinc/protected/components/X2WebApplication.php(66): X2WebApplication->runController()#29 /home/contactzco/public_html/agrinc/framework/base/CApplication.php(185): X2WebApplication->processRequest()#30 /home/contactzco/public_html/agrinc/index.php(68): X2WebApplication->run()X2Engine Version: 8.0PHP Version: 7.3.16 See attached screenshot of my screen with error. Hope this can help to resolve the problem. Thank you Charl Quote Link to post Share on other sites
FlorenceSa 0 Posted April 23, 2020 Report Share Posted April 23, 2020 Hi did you solve the problem? I have the same Quote Link to post Share on other sites
Charl Beetge 2 Posted April 23, 2020 Author Report Share Posted April 23, 2020 Hi FlorenceSa, no I've not been able to resolve this and have not heard from anybody at X2 to get it resolved, hopefully soon Quote Link to post Share on other sites
jack 30 Posted April 24, 2020 Report Share Posted April 24, 2020 On the file (protected/modules/reports/components/SummationReportGridView.php) change /** * Initializes hidden columns */ public function initColumns () { if (count ($this->hiddenColumns)) { $tmp = $this->columns; $this->columns = $this->hiddenColumns; parent::initColumns (); $this->hiddenColumns = $this->columns; $this->columns = $tmp; } parent::initColumns (); } To /** * Initializes hidden columns */ public function initColumns () { if (is_array($this->hiddenColumns) && count ($this->hiddenColumns)) { $tmp = $this->columns; $this->columns = $this->hiddenColumns; parent::initColumns (); $this->hiddenColumns = $this->columns; $this->columns = $tmp; } parent::initColumns (); } That should fix your issue 2 Quote Link to post Share on other sites
Charl Beetge 2 Posted April 27, 2020 Author Report Share Posted April 27, 2020 Jack, thank you for the fix, works well, much appreciated Quote Link to post Share on other sites
jack 30 Posted April 29, 2020 Report Share Posted April 29, 2020 No problem, happy to help. Quote Link to post Share on other sites
alt_f4 57 Posted June 16, 2021 Report Share Posted June 16, 2021 @jackWhen there´ll be an valid update for this and the other bugs? It´s OK to search for soltions (the one above helped me out!), but it´s a little bit annoying to investigate... Regards! Quote Link to post Share on other sites
jack 30 Posted June 17, 2021 Report Share Posted June 17, 2021 Hi alt_f4, This and other bugs will be fix in our next update. -Jack Quote Link to post Share on other sites
alt_f4 57 Posted July 9, 2021 Report Share Posted July 9, 2021 Hi @jack, any ETA? Regards! Quote Link to post Share on other sites
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.