CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Report and Search UI Discussion (Moderators: CiviTeacher.com, TwoMice) »
  • Extended reports - array_key_exists() error
Pages: [1]

Author Topic: Extended reports - array_key_exists() error  (Read 2140 times)

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Extended reports - array_key_exists() error
December 14, 2012, 05:08:13 am
I've been trying to get the extended reports extension working, but each time I try to create a report from one of the extended templates, I get a series of php warnings such as this:

Code: [Select]
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 466 of /var/www/drupal-7.15/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ExtendedReport.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 466 of /var/www/drupal-7.15/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ExtendedReport.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 466 of /var/www/drupal-7.15/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport/CRM/Extendedreport/Form/Report/ExtendedReport.php).

These are "just warnings" so shouldn't be a major problem. But the reports also don't work, which is more of a problem - the pivot table report, for instance offers completely empty drop-downs for the column headers and row fields options. The reports are clearly failing to read something from the data in my site.

The extension claimed to install correctly, but there's clearly something wrong. Any suggestions? Is this a php version issue or a permissions problem somewhere?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Extended reports - array_key_exists() error
December 14, 2012, 11:13:31 am
It seems like this is a harmless (buy annoying) error that would occur if no custom fields are defined for you install?

Can you try this patch?

https://github.com/eileenmcnaughton/nz.co.fuzion.extendedreport/commit/164794954b17199a0178e7136e4cda0a2813d020
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Re: Extended reports - array_key_exists() error
December 18, 2012, 02:23:03 am
Hmmm. But I do have custom fields. And there's some harm, somewhere, since I can't actually construct reports using your templates. I will check out the patch, though.

nickholden

  • I post occasionally
  • **
  • Posts: 111
  • Karma: 1
  • CiviCRM version: 4.4.1
  • CMS version: Drupal 7
  • MySQL version: 5.5.32
  • PHP version: 5.4
Re: Extended reports - array_key_exists() error
December 18, 2012, 03:14:54 am
Hi Eileen,

It is looking like this might be a php version issue. I have another test Civi system, with the same data, running php version 5.3.10 and the extended reports offer me custom data in just the way I expected. But in my sandbox, using php version 5.4.6 the custom data is not being picked up. Do you know if there are people using extended reports with php 5.4.x anywhere?

Nick

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: Extended reports - array_key_exists() error
December 18, 2012, 01:14:22 pm
I'd have to check if we have it on any of our servers - I think so. Note that there are patches in the extension without there being a new release - so uninstalling & installing will pick up the latest version of the code (incl that patch) without removing anything.
Make today the day you step up to support CiviCRM and all the amazing organisations that are using it to improve our world - http://civicrm.org/contribute

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion »
  • Report and Search UI Discussion (Moderators: CiviTeacher.com, TwoMice) »
  • Extended reports - array_key_exists() error

This forum was archived on 2017-11-26.