Jump to content
X2Community Forums

Error 500 on Summation Report


Recommended Posts

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

Link to post
Share on other sites

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

post-11430-0-44514400-1587476688_thumb.jpg

Link to post
Share on other sites

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
  • Like 2
Link to post
Share on other sites
  • 1 year later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...