Jump to content


Photo

Error 500 on Summation Report

summation

  • Please log in to reply
7 replies to this topic

#1 Charl Beetge

Charl Beetge

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationCenturion, Gauteng, South Africa

Posted 18 April 2020 - 05:55 AM

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



#2 jack

jack

    Admin

  • Administrators
  • 53 posts

Posted 20 April 2020 - 09:25 AM

Can you please upload the stack trace and photo of the report you are trying to run



#3 Charl Beetge

Charl Beetge

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationCenturion, Gauteng, South Africa

Posted 21 April 2020 - 05:46 AM

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: 500
Error Message: count(): Parameter must be an array or an object that implements Countable
Stack 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.0
PHP Version: 7.3.16

 

See attached screenshot of my screen with error. Hope this can help to resolve the problem.

 

Thank you

 

Charl

Attached Files



#4 FlorenceSa

FlorenceSa

    Newbie

  • Members
  • Pip
  • 1 posts
  • LocationWonnangatta

Posted 23 April 2020 - 01:33 AM

Hi

 

did you solve the problem? I have the same



#5 Charl Beetge

Charl Beetge

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationCenturion, Gauteng, South Africa

Posted 23 April 2020 - 01:46 AM

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



#6 jack

jack

    Admin

  • Administrators
  • 53 posts

Posted 24 April 2020 - 08:04 AM

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


#7 Charl Beetge

Charl Beetge

    Member

  • Members
  • PipPip
  • 15 posts
  • LocationCenturion, Gauteng, South Africa

Posted 27 April 2020 - 03:06 AM

Jack, thank you for the fix, works well, much appreciated  :D



#8 jack

jack

    Admin

  • Administrators
  • 53 posts

Posted 29 April 2020 - 12:21 PM

No problem, happy to help.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users