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) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • "Illegal offset type" warning for Extended Reports
Pages: [1] 2 3 4

Author Topic: "Illegal offset type" warning for Extended Reports  (Read 5161 times)

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
"Illegal offset type" warning for Extended Reports
September 09, 2013, 05:09:48 am
Hi there - not sure if I should post this here or in the Extensions forum, but here goes:

I just installed the Extended Reports extension, and it produces the following warning when I try to use the 'Activity Extended' report:

Warning: Illegal offset type in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 1230 of [Extended Report folder location] \ CRM \ Extendedreport \ Form \ Report \ ExtendedReport. php).

Line 1230 of the ExtendedReport.php is:

$this->_columns[$tableAlias] = $this->_customFields[$tableName];

in the middle of:

    $customFieldsFlat = array();
    if(!empty($this->_customGroupExtended)){
      //lets try to assign custom data select fields
      foreach ($this->_customGroupExtended as $table => $spec){
        $customFieldsTable[$table] = $spec['title'];
        foreach ($spec['extends'] as $entendedEntity){
          if(array_key_exists($entendedEntity, $customTableMapping)){
            foreach ($customTableMapping[$entendedEntity] as $customTable){
              $tableName = $this->_customFields[$customTable]['name'];
              $tableAlias = $table . "_" . $this->_customFields[$customTable]['name'];
              $this->_columns[$tableAlias] = $this->_customFields[$tableName];
              $this->_columns[$tableAlias]['alias'] = $tableAlias;
              $this->_columns[$table]['dao'] = 'CRM_Contact_DAO_Contact';
              unset ($this->_columns[$tableAlias]['fields']);
            }

            foreach ($customFieldsTableFields[$entendedEntity] as $customFieldName => $customFieldLabel){
              $customFields[$table][$table . ':' . $customFieldName] = $spec['title'] . $customFieldLabel;
              $customFieldsFlat[$table . ':' . $customFieldName] = $spec['title'] . $customFieldLabel;
            }
          }
        }
      }
    }

(Sorry it's not in code tags, the forum won't let me post like that - says I'm not allowed to post external links, which is understandable, or would be, if I was actually attempting to post an external link :| )

The warning appears multiple times - We do have a lot of custom data sets for different activity types, and disabling them makes the warnings disappear, but obviously that defeats the point of the report.

I'm pretty sure that the other extended reports are also failing - they're not producing warnings/errors, but they're not always displaying custom data - but without having access to a working version, I'm not sure what I should expect to see in these cases, so I'm concentrating on the Activity Report for now.

We have CiviCRM 4.3.5 running on Drupal 7.23, on a local XAMPP server (Apache 2.2.17, PHP 5.3.5, MySQL 5.0.7). I had to install the extension manually. I have also just upgraded the system (rather laboriously, from 4.0.8 to 4.1.0, to 4.2.0, to 4.2.9, to 4.3.5, after my attempt to upgrade directly to 4.3.5 went horribly, horribly wrong...)

I've tried installing the extension in a fresh installation of CiviCRM on the same server, but I haven't had a chance to add any data to that to see if it works. It does throw out the following notice for the Activity Extended report:

Notice: Undefined variable: customFields in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 1262 of [Extended Report folder location] \ CRM \ Extendedreport \ Form \ Report \ ExtendedReport. php).

...which disappears when a custom data set is applied to Activities. There's a forum post that indicates that this happens when there isn't any custom data defined, which definitely isn't the problem with our main CiviCRM, but it relates to the same section of code, the $customFieldsFlat array.

Any help with this would be much appreciated!

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 09, 2013, 05:55:41 am
I'll take a look tomorrow - but can you confirm the version of extended reports is 1.4?
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

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: "Illegal offset type" warning for Extended Reports
September 09, 2013, 06:04:02 am
Hi Eileen - sorry, I should have included that! It is version 1.4 (I tried both that and the 'master' download from github, as I wasn't sure if they were different - got the same result with both)

Thanks for taking a look at this.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 09, 2013, 05:22:56 pm
I've pushed a fix onto github - unfortunately I can't check the output of the report yet as I am on 4.4 & need to upgrade that report to cope with 4.4 schema changes (which I am doing) - but it you do a git pull you can check
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

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: "Illegal offset type" warning for Extended Reports
September 10, 2013, 03:52:53 am
Thanks Eileen - I've tried this, but although the 'illegal offset type' warning no longer displays, I now get a "Sorry but we are not able to provide this at the moment. / DB Error: no such table" error message when I hit the preview button.

The other reports now seem to be giving me the custom data to display and filter by, but when I run them, they're not displaying data that I know exists (e.g. membership type in the Membership Price Set Report)

It doesn't tell me which table it thinks doesn't exist - there are discrepancies in the database structure between our upgraded CiviCRM and the fresh install, but other than the custom data it's mostly in the Drupal tables? The only civiCRM table in the fresh installation that seems to be missing from the upgraded version is civicrm_official_receipt, which doesn't seem like it would relate to activities?

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 10, 2013, 04:15:15 am
can you make sure debugging is on so you can post the failed sql query?
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

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: "Illegal offset type" warning for Extended Reports
September 10, 2013, 04:29:58 am
...that's an idea :)

From the Activity Extended error message I get:

Database Error Code: Table 'switchuptest.civicrm_activity_contact' doesn't exist, 1146
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

        [ code ] => -18
       
[message] => DB Error: no such table
    [mode] => 16
    [debug_info] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport
        LEFT JOIN civicrm_activity_contact civicrm_activity_target
          ON activity_civireport.id = civicrm_activity_target.activity_id
          AND civicrm_activity_target.record_type_id = 3
        LEFT JOIN civicrm_contact target_civicrm_contact_civireport
          ON civicrm_activity_target.contact_id = target_civicrm_contact_civireport.id
       
        LEFT JOIN civicrm_activity_contact civicrm_activity_assignment
          ON activity_civireport.id = civicrm_activity_assignment.activity_id
          AND civicrm_activity_assignment.record_type_id = 1
        LEFT JOIN civicrm_contact civicrm_contact_assignee
          ON civicrm_activity_assignment.contact_id = civicrm_contact_assignee.id
         
        LEFT JOIN civicrm_activity_contact civicrm_activity_source
        ON activity_civireport.id = civicrm_activity_source.activity_id
        AND civicrm_activity_source.record_type_id = 2
        LEFT JOIN civicrm_contact civicrm_contact_civireport
        ON civicrm_activity_source.contact_id = civicrm_contact_civireport.id
       

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= '20130901000000') AND ( activity_civireport.activity_date_time <= '20130930235959' ) AND ( activity_civireport.is_current_revision = 1 ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1146 ** Table 'switchuptest.civicrm_activity_contact' doesn't exist]
    [type] => DB_Error
    [user_info] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport
        LEFT JOIN civicrm_activity_contact civicrm_activity_target
          ON activity_civireport.id = civicrm_activity_target.activity_id
          AND civicrm_activity_target.record_type_id = 3
        LEFT JOIN civicrm_contact target_civicrm_contact_civireport
          ON civicrm_activity_target.contact_id = target_civicrm_contact_civireport.id
       
        LEFT JOIN civicrm_activity_contact civicrm_activity_assignment
          ON activity_civireport.id = civicrm_activity_assignment.activity_id
          AND civicrm_activity_assignment.record_type_id = 1
        LEFT JOIN civicrm_contact civicrm_contact_assignee
          ON civicrm_activity_assignment.contact_id = civicrm_contact_assignee.id
         
        LEFT JOIN civicrm_activity_contact civicrm_activity_source
        ON activity_civireport.id = civicrm_activity_source.activity_id
        AND civicrm_activity_source.record_type_id = 2
        LEFT JOIN civicrm_contact civicrm_contact_civireport
        ON civicrm_activity_source.contact_id = civicrm_contact_civireport.id
       

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= '20130901000000') AND ( activity_civireport.activity_date_time <= '20130930235959' ) AND ( activity_civireport.is_current_revision = 1 ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1146 ** Table 'switchuptest.civicrm_activity_contact' doesn't exist]
    [to_string] => [db_error: message="DB Error: no such table" code=-18 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport
        LEFT JOIN civicrm_activity_contact civicrm_activity_target
          ON activity_civireport.id = civicrm_activity_target.activity_id
          AND civicrm_activity_target.record_type_id = 3
        LEFT JOIN civicrm_contact target_civicrm_contact_civireport
          ON civicrm_activity_target.contact_id = target_civicrm_contact_civireport.id
       
        LEFT JOIN civicrm_activity_contact civicrm_activity_assignment
          ON activity_civireport.id = civicrm_activity_assignment.activity_id
          AND civicrm_activity_assignment.record_type_id = 1
        LEFT JOIN civicrm_contact civicrm_contact_assignee
          ON civicrm_activity_assignment.contact_id = civicrm_contact_assignee.id
         
        LEFT JOIN civicrm_activity_contact civicrm_activity_source
        ON activity_civireport.id = civicrm_activity_source.activity_id
        AND civicrm_activity_source.record_type_id = 2
        LEFT JOIN civicrm_contact civicrm_contact_civireport
        ON civicrm_activity_source.contact_id = civicrm_contact_civireport.id
       

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= '20130901000000') AND ( activity_civireport.activity_date_time <= '20130930235959' ) AND ( activity_civireport.is_current_revision = 1 ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1146 ** Table 'switchuptest.civicrm_activity_contact' doesn't exist]"]
)


It produces the same error (and same missing table, civicrm_activity_contact) in my fresh installation.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 10, 2013, 07:30:35 pm
hmm - I changed the check for the activity_contact table to a specific check on whether that table exists - it ran OK just now on 4.2
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

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: "Illegal offset type" warning for Extended Reports
September 16, 2013, 04:28:03 am
Hi there - meant to reply to this last week, sorry!

I'm reaching the limits of understanding of MySQL here (not that that's very hard - pretty much amounts to 'that's a database') - there isn't a civicrm_activity_contact table in the database, but I'm assuming this isn't the issue here?


I remembered that I'd put together a testing site on our web server - it's Drupal 7.22 and CiviCRM 4.3.4 - I tried installing the Extended Reports extension, and got slightly further - I could preview the Activity Extended report until I tried filtering it by the custom data - at that point I got the following error:

Database Error Code: Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause', 1054
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

        [ code ] => -19
       
[message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport

   LEFT JOIN civicrm_activity_target
   ON activity_civireport.id = civicrm_activity_target.activity_id

   LEFT JOIN civicrm_activity_assignment
   ON activity_civireport.id = civicrm_activity_assignment.activity_id

   LEFT JOIN civicrm_contact civicrm_contact_civireport
   ON activity_civireport.source_contact_id = civicrm_contact_civireport.id

   LEFT JOIN civicrm_contact target_civicrm_contact_civireport
   ON civicrm_activity_target.target_contact_id = target_civicrm_contact_civireport.id

   LEFT JOIN civicrm_contact civicrm_contact_assignee
   ON civicrm_activity_assignment.assignee_contact_id = civicrm_contact_assignee.id

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= 20130901000000 ) AND ( activity_civireport.activity_date_time <= 20130930235959 ) AND ( activity_civireport.is_current_revision = 1 ) AND ( contact_activity_civicrm_value_test_custom_data_1_civireport.test_1 LIKE '%Testing%' ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause']
    [type] => DB_Error
    [user_info] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport

   LEFT JOIN civicrm_activity_target
   ON activity_civireport.id = civicrm_activity_target.activity_id

   LEFT JOIN civicrm_activity_assignment
   ON activity_civireport.id = civicrm_activity_assignment.activity_id

   LEFT JOIN civicrm_contact civicrm_contact_civireport
   ON activity_civireport.source_contact_id = civicrm_contact_civireport.id

   LEFT JOIN civicrm_contact target_civicrm_contact_civireport
   ON civicrm_activity_target.target_contact_id = target_civicrm_contact_civireport.id

   LEFT JOIN civicrm_contact civicrm_contact_assignee
   ON civicrm_activity_assignment.assignee_contact_id = civicrm_contact_assignee.id

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= 20130901000000 ) AND ( activity_civireport.activity_date_time <= 20130930235959 ) AND ( activity_civireport.is_current_revision = 1 ) AND ( contact_activity_civicrm_value_test_custom_data_1_civireport.test_1 LIKE '%Testing%' ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport

   LEFT JOIN civicrm_activity_target
   ON activity_civireport.id = civicrm_activity_target.activity_id

   LEFT JOIN civicrm_activity_assignment
   ON activity_civireport.id = civicrm_activity_assignment.activity_id

   LEFT JOIN civicrm_contact civicrm_contact_civireport
   ON activity_civireport.source_contact_id = civicrm_contact_civireport.id

   LEFT JOIN civicrm_contact target_civicrm_contact_civireport
   ON civicrm_activity_target.target_contact_id = target_civicrm_contact_civireport.id

   LEFT JOIN civicrm_contact civicrm_contact_assignee
   ON civicrm_activity_assignment.assignee_contact_id = civicrm_contact_assignee.id

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= 20130901000000 ) AND ( activity_civireport.activity_date_time <= 20130930235959 ) AND ( activity_civireport.is_current_revision = 1 ) AND ( contact_activity_civicrm_value_test_custom_data_1_civireport.test_1 LIKE '%Testing%' ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause']"]
)

...I can't tell if this is related to the other error, I'm afraid!



Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 16, 2013, 05:18:06 am
So, the custom data filter is against the source contact? or the activity? I can see the join appears to be missing & I doubt I did much testing on filters when I looked at it for you
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

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 16, 2013, 05:18:58 am
NB - you have the latest from github don't you? ie. '1.4' is not the very latest
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

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: "Illegal offset type" warning for Extended Reports
September 16, 2013, 09:27:20 am
Ah - for the online test site I just used the extension installation tool within CiviCRM. I switched it manually for the current version from github, but it still gives an error:

Database Error Code: Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause', 1054
Additional Details:
Array
(
    [callback] => Array
        (
           
  • => CRM_Core_Error
  • [1] => handle
            )

        [ code ] => -19
       
[message] => DB Error: no such field
    [mode] => 16
    [debug_info] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport
      LEFT JOIN civicrm_activity_target
        ON activity_civireport.id = civicrm_activity_target.activity_id
      LEFT JOIN civicrm_contact target_civicrm_contact_civireport
        ON civicrm_activity_target.target_contact_id = target_civicrm_contact_civireport.id
     
        LEFT JOIN civicrm_activity_assignment
          ON activity_civireport.id = civicrm_activity_assignment.activity_id
        LEFT JOIN civicrm_contact civicrm_contact_assignee
          ON civicrm_activity_assignment.assignee_contact_id = civicrm_contact_assignee.id
       
        LEFT JOIN civicrm_contact civicrm_contact_civireport
        ON activity_civireport.source_contact_id = civicrm_contact_civireport.id

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= '20130901000000') AND ( activity_civireport.activity_date_time <= '20130930235959' ) AND ( activity_civireport.is_current_revision = 1 ) AND ( contact_activity_civicrm_value_test_custom_data_1_civireport.test_1 LIKE '%Testing%' ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause']
    [type] => DB_Error
    [user_info] => SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport
      LEFT JOIN civicrm_activity_target
        ON activity_civireport.id = civicrm_activity_target.activity_id
      LEFT JOIN civicrm_contact target_civicrm_contact_civireport
        ON civicrm_activity_target.target_contact_id = target_civicrm_contact_civireport.id
     
        LEFT JOIN civicrm_activity_assignment
          ON activity_civireport.id = civicrm_activity_assignment.activity_id
        LEFT JOIN civicrm_contact civicrm_contact_assignee
          ON civicrm_activity_assignment.assignee_contact_id = civicrm_contact_assignee.id
       
        LEFT JOIN civicrm_contact civicrm_contact_civireport
        ON activity_civireport.source_contact_id = civicrm_contact_civireport.id

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= '20130901000000') AND ( activity_civireport.activity_date_time <= '20130930235959' ) AND ( activity_civireport.is_current_revision = 1 ) AND ( contact_activity_civicrm_value_test_custom_data_1_civireport.test_1 LIKE '%Testing%' ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause']
    [to_string] => [db_error: message="DB Error: no such field" code=-19 mode=callback callback=CRM_Core_Error::handle prefix="" info="SELECT SQL_CALC_FOUND_ROWS civicrm_contact_civireport.display_name as civicrm_contact_display_name, activity_civireport.id as civicrm_activity_id, activity_civireport.activity_type_id as civicrm_activity_activity_type_id, activity_civireport.subject as civicrm_activity_activity_subject, activity_civireport.activity_date_time as civicrm_activity_activity_date_time, activity_civireport.status_id as civicrm_activity_activity_status_id 
    FROM civicrm_activity activity_civireport
      LEFT JOIN civicrm_activity_target
        ON activity_civireport.id = civicrm_activity_target.activity_id
      LEFT JOIN civicrm_contact target_civicrm_contact_civireport
        ON civicrm_activity_target.target_contact_id = target_civicrm_contact_civireport.id
     
        LEFT JOIN civicrm_activity_assignment
          ON activity_civireport.id = civicrm_activity_assignment.activity_id
        LEFT JOIN civicrm_contact civicrm_contact_assignee
          ON civicrm_activity_assignment.assignee_contact_id = civicrm_contact_assignee.id
       
        LEFT JOIN civicrm_contact civicrm_contact_civireport
        ON activity_civireport.source_contact_id = civicrm_contact_civireport.id

   

   LEFT JOIN civicrm_case_activity case_activity_civireport
   ON case_activity_civireport.activity_id = activity_civireport.id
   LEFT JOIN civicrm_case
   ON case_activity_civireport.case_id = civicrm_case.id  WHERE ( activity_civireport.activity_date_time >= '20130901000000') AND ( activity_civireport.activity_date_time <= '20130930235959' ) AND ( activity_civireport.is_current_revision = 1 ) AND ( contact_activity_civicrm_value_test_custom_data_1_civireport.test_1 LIKE '%Testing%' ) AND civicrm_contact_civireport.is_deleted = 0    ORDER BY civicrm_contact_civireport.sort_name ASC, civicrm_contact_civireport.sort_name ASC  LIMIT 0, 50 [nativecode=1054 ** Unknown column 'contact_activity_civicrm_value_test_custom_data_1_civireport.test_1' in 'where clause']"]
)


The custom data for this and the fresh local install is for the activity (in both cases it's just one alpanumeric text field). On our production system (I'm testing this on a copy of the live system), we've got custom data for both activities and contacts, although for the Activity Extended all the custom data relates to the activities (both activities and events). And in the two local installations, I can't get it as far as displaying the unfiltered activities.

Eileen

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4195
  • Karma: 218
    • Fuzion
Re: "Illegal offset type" warning for Extended Reports
September 16, 2013, 05:52:38 pm
OK- I've made a couple more fixes - on github- if it works for you I might increment the version
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

liblogger

  • I’m new here
  • *
  • Posts: 19
  • Karma: 0
  • CiviCRM version: 4.3.5
  • CMS version: Drupal 7.23
  • MySQL version: 5.0.7
  • PHP version: 5.3.5
Re: "Illegal offset type" warning for Extended Reports
September 17, 2013, 06:31:19 am
Hi there - tried the new version, and now get the following error/warning when I go to create a new Activity Extended report:

Notice: Undefined index: civicrm_value_test_custon_data_1 in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 1280 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\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 1280 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).


This is for the two test sites, which only have one custom data field - on the copy of our production system, I don't get the 'undefined index' notice, but I do get multiple instances of the 'array_key_exists() expects parameter 2 to be array' warning.

In all three cases, none of the custom data fields are available as filters, but when I preview the report, I'm no longer getting database errors.  I do get the following warnings:

Notice: Undefined index: civicrm_value_test_custon_data_1 in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 1280 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\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 1280 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Notice: Undefined index: filters in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Notice: Undefined index: filters in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Notice: Undefined index: filters in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Notice: Undefined index: filters in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).
Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->selectableCustomDataFrom() (line 1444 of C:\xampp\htdocs\botch\sites\default\files\civicrm\custom_ext\nz.co.fuzion.extendedreport-master\CRM\Extendedreport\Form\Report\ExtendedReport.php).

for the two test sites, and the same multiple 'array_key_exists() expects parameter 2 to be array' warnings on the site with lots of custom data.

Some of the other reports are also throwing out multiple 'array_key_exists() expects parameter 2 to be array' warnings.


JohnM

  • I post occasionally
  • **
  • Posts: 36
  • Karma: 0
  • CiviCRM version: 4.4.6
  • CMS version: Drupal 7
Re: "Illegal offset type" warning for Extended Reports
September 17, 2013, 04:24:08 pm
Hi Eileen, I am having a similar problems with the new update to Extended Reports 1.4. There seems to be some issues with the custom data not linking to the extended reports. I have just updated tonight to 1.4 and am now receiving similar errors. This is what I am seeing...

•Warning: array_key_exists() expects parameter 2 to be array, null given in CRM_Extendedreport_Form_Report_ExtendedReport->addSelectableCustomFields() (line 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/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 1280 of /home/admin/public_html/sites/all/civicrm_extensions/nz.co.fuzion.extendedreport-1.4/nz.co.fuzion.extendedreport-1.4/CRM/Extendedreport/Form/Report/ExtendedReport.php).

I have used the update function in extensions to upgrade and the above error message is now displayed. I updated the extension with  the latest version from your github but again same error is displayed. I then tried deleting the 1.3 folder and doing a fresh install with 1.4 with the latest version from the github added to it. Again the same error message is displayed.

From what I can tell it looks as though the new version is not linking correctly to the custom data SQL tables.

I hope the above is helpful in sorting out this problem. This is a great extension if we can get this sorted.

Pages: [1] 2 3 4
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • "Illegal offset type" warning for Extended Reports

This forum was archived on 2017-11-26.