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 CiviMail (Moderator: Piotr Szotkowski) »
  • Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues()
Pages: [1]

Author Topic: Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues()  (Read 706 times)

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues()
February 06, 2013, 05:43:23 pm
Hi there,

This is an issue that has plagued a new D7/civiCRM 4.2.4 site since day one and I've put a few hours into it this afternoon but I can't come up with any resolution. Without fail, if I got to Mailings -> Draft and Unscheduled Mailings and then select Continue I will receive the following Warning Errors:


Notice: Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues() (line 117 of /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Mailing/Form/Group.php).
Notice: Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues() (line 118 of /var/www/vhosts/example.com/httpdocs/sites/all/modules/civicrm/CRM/Mailing/Form/Group.php).



It is the same issue reported on this closed thread, except that my groups are fine so I think that thread involved two separate issues: http://forum.civicrm.org/index.php?topic=25462.0

EDIT:
So the offending lines are as follows

Code: [Select]
$defaults['includeMailings'] = CRM_Utils_Array::value('Include', $mailingGroups['civicrm_mailing']);
$defaults['excludeMailings'] = $mailingGroups['civicrm_mailing']['Exclude'];

PHP is complaining that in $mailingGroups['civicrm_mailing'] the index 'civicrm_mailing' doesn't exist. Does anyone have good insight about the $mailingGroups array?

Thanks,
Andrew
« Last Edit: February 06, 2013, 05:48:29 pm by awasson »
My CiviCRM Extension Workshop: https://github.com/awasson

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: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues()
February 06, 2013, 08:28:50 pm

pretty sure this has been fixed in 4.3

might want to check the code in 4.3 and see how we get around it. We basically initialize all the variables to empty arrays to begin with

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

awasson

  • I post frequently
  • ***
  • Posts: 230
  • Karma: 7
  • Living in a world of Drupal / CiviCRM
    • My Company: Luna Design
  • CiviCRM version: Latest
  • CMS version: Drupal 6/7/8
  • MySQL version: 5.x
  • PHP version: 5.3.x
Re: Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues()
February 06, 2013, 11:47:28 pm
Thanks Lobo,

I'll upgrade and see how it handles it. I'll report back.

Andrew
My CiviCRM Extension Workshop: https://github.com/awasson

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Undefined index: civicrm_mailing in CRM_Mailing_Form_Group->setDefaultValues()

This forum was archived on 2017-11-26.