1

I've just migrated a civiCRM instance from Joomla! to Drupal. Everything I've tried so far works and it's the best thing ever. I find everything we want to do so much easier to get around in Drupal.

One problem:

When a user makes a new account, using a civiCRM profile I've made, I get all these errors:

Notice: Undefined index: contact_sub_type in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2010 of [redacted]/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php). Warning: in_array() expects parameter 2 to be array, null given in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2011 of [redacted]/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php). Notice: Undefined index: contact_sub_type in CRM_Contact_BAO_Contact::formatProfileContactParams() (line 2012 of [redacted]/sites/all/modules/civicrm/CRM/Contact/BAO/Contact.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 763 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 767 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 777 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 781 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).

They are filling in custom fields at this point of registration, and some of them are multi valued if that has any bearing on anything.

Also when updating details of a user I get:

Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 781 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 767 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 777 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php). Notice: Trying to get property of non-object in CRM_Mailing_BAO_Mailing->getTemplates() (line 763 of [redacted]/sites/all/modules/civicrm/CRM/Mailing/BAO/Mailing.php).

Again, we are updating those custom multi valued fields using a profile. No, I tell a lie, there are still custom fields, but not multi valued ones here.

This does not happen updating user details using the civiCRM administrative interface. Everything is fine there.

Any hints what the issue could be? does it matter? I'm yet to find anything that does not work, it just regularly throws these errors up. It does matter from a user experience point of view, I at least want to hide these messages. I have not quite finished testing everything though.

This is also on new hosting, so databases have been restored and such. Possibly there is something this host is not doing? but I can't think what it could be.

[edit] Found something that does not work. Removing contacts from a group. When I remove a contact from a group they are immediately added back with a status of "Added (by API)" Date added being the time you removed the group. You see this immediately in the administrative interface. Not sure that this is possibly related. [edit again] no, only some groups. Some groups remove just fine, I think this is group thing is a drupal group sync thing (greatest thing ever by the way!)[edit again] yes, group sync thing, I had an extra rule making a bit of an infinite loop: not related to the above problem. ignore this please.

1

To suppress these messages, add the following code to your settings.php or civicrm.settings.php

ini_set('error_reporting', E_ALL & ~E_DEPRECATED & ~E_NOTICE);

Long answer on Drupal Answers.

CiviCRM generates a substantial number of E_NOTICE messages - these are notices, which is less severe than warnings. If they bother you, submitting patches to address them is a great way to start contributing code to CiviCRM!

  • So I take it this means you think there is too much error reporting going on and I should lower what is being reported using setting.php – Josh Feb 12 '16 at 6:01
  • This seems to have worked, the error no longer get shoved in the users face. I can't find anything broken so I'll call this fixed. – Josh Feb 12 '16 at 6:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.