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) »
  • Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
Pages: [1]

Author Topic: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer  (Read 2967 times)

davideps

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3.2
Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 16, 2011, 07:51:02 pm
When I select Reports-->Current Employer Report, before the results, I see many rows that look like this:


Notice: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer->select() (line 170 of /var/www/drupal-7.0/sites/all/modules/civicrm/CRM/Report/Form/Contact/CurrentEmployer.php).
Notice: Undefined index: operatorType in CRM_Report_Form_Contact_CurrentEmployer->where() (line 209 of /var/www/drupal-7.0/sites/all/modules/civicrm/CRM/Report/Form/Contact/CurrentEmployer.php).
Notice: Undefined index: civicrm_employer_organization_name in CRM_Report_Form_Contact_CurrentEmployer->alterDisplay() (line 281 of /var/www/drupal-7.0/sites/all/modules/civicrm/CRM/Report/Form/Contact/CurrentEmployer.php).
Notice: Undefined index: civicrm_employer_id in CRM_Report_Form_Contact_CurrentEmployer->alterDisplay() (line 281 of /var/www/drupal-7.0/sites/all/modules/civicrm/CRM/Report/Form/Contact/CurrentEmployer.php).

Could anyone provide some insight about the problem?


Thank you,
-david

davideps

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3.2
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 29, 2011, 08:17:36 pm
I am still having an identical problem, even after upgrading to CiviCRM 4.0.7. What is the index it refers to? Is this something I can generate manually? I seem to get one line like below for each contact in the report!

Notice: Undefined index: civicrm_employer_organization_name in CRM_Report_Form_Contact_CurrentEmployer->alterDisplay() (line 281 of /var/www/drupal-7.0/sites/all/modules/civicrm/CRM/Report/Form/Contact/CurrentEmployer.php).

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 30, 2011, 04:33:37 am
Are you 100% certain you have CiviCRM 4.0.7? Can you post line 181 from your civicrm/CRM/Report/Form/Contact/CurrentEmployer.php ? Because I don't see civicrm_employer_organization_name there.
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

davideps

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3.2
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 30, 2011, 06:24:28 am
Hi Hershel,

line 181 of civicrm/CRM/Report/Form/Contact/CurrentEmployer.php is:

          $this->_from = "

civicrm_employer_organization_name is only mentioned in lines 267 and 272.

It gets even stranger! I just looked at my backup running on a fresh install on another computer. I'm getting the same error there when I run a current employer report. In both cases, I receive all the data correctly at the bottom of the screen with the error.

The footer on each page of both websites says "Powered by CiviCRM 4.0.7". Sadly, this is way over my head. I have no explanation. It worries me that the problem seems to follow my data.

-david

Hershel

  • Forum Godess / God
  • I’m (like) Lobo ;)
  • *****
  • Posts: 4640
  • Karma: 176
    • CiviHosting
  • CiviCRM version: Latest
  • CMS version: Mostly WordPress and Drupal
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 30, 2011, 09:11:14 am
Not sure. However since there are known bugs with Drupal 7.0 I would start by upgrading that. I don't think it's related, but one never knows...
CiviHosting and CiviOnline -- The CiviCRM hosting experts, since 2007

See here for the official: What to do if you think you've found a bug.

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 31, 2011, 08:05:19 am

Note that CiviCRM 4.0.x will give a fair number of notices in Drupal 7. You need to turn this off in your admin settings for Drupal.

We are making a strong effort to eliminate all these notices from 4.1. Would be great if folks could jump on the bandwagon and submit patches to make this happen. You will need to check the latest version of the code since we have gotten rid of quite a few of these notices already

Please avoid filing (or asking people to file) issues regarding notices in 4.0.x

lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

davideps

  • I’m new here
  • *
  • Posts: 28
  • Karma: 0
  • CiviCRM version: 4.0
  • CMS version: Drupal 7
  • MySQL version: 5.1
  • PHP version: 5.3.2
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
October 31, 2011, 09:51:33 pm
Thank you. In Drupal:

Selecting "Errors and warnings" rather than "All messages" from Configuration-->Logging and errors
keeps these index messages from appearing.

-david

ouyang1512

  • I post occasionally
  • **
  • Posts: 59
  • Karma: 0
  • CiviCRM version: 4.1.1
  • CMS version: Drupal 7.12
  • MySQL version: MySQL 5.1.52
  • PHP version: 5.3.6
Re: Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer
February 15, 2012, 07:28:47 am
I am also having the same issue on Current Employer Report page. These messages do not appear on other page though. All of them are" Notice: Undefined index" messages

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviReport (Moderator: Dave Greenberg) »
  • Undefined index: type in CRM_Report_Form_Contact_CurrentEmployer

This forum was archived on 2017-11-26.