on contact saving : Trying to get property of non-object - Contacts\Contact.php on line 391

Running Version 7.4
when saving a contact we get this error PHP Notice: Trying to get property of non-object … \Contacts\Contact.php on line 391.
I traced it back to

if( !empty($this->campaign_id)){
			$camp = new Campaign();
		    $where = "campaigns.id='{$this->campaign_id}'";
		    $campaign_list = $camp->get_full_list("campaigns.name", $where, true);
		    $this->campaign_name = $campaign_list[0]->name;  **** This is line 391

until I assign a campaign to the contact this error shows up in php error (not suite error log)



I receive the same error when trying to import contacts into suiteCRM 7.4.3 MAX.
Being a new user, my post has to be checked by Admin; it’s taking over 18 hours by now.

no ideea on this one ? what should we do ?
We cannot import hundread of contacts . . …

why not,
yes I get the error but it does not prevent me from importing, although I must say that I built my own import module, I have no idea is the problem reflects in the application.

Hi bmwtourer,

I may not offered the complete explanation. When I use an excel file to import the contacts, nothing is imported - probably since the .csv formatting is not proper. If I have 5 contacts the error is: 5 contacts were not imported due to errors . . .

When I use the sample .csv file provided for download on the Contacts section, from 5 lines (5 contacts) I can get only 2 contacts to be imported, 3 are with errors, and the error message is related with this line 391 . . .which has nothing to do with Contacts - but with the Campaign Section . . . this I do not get . . and how to solve this error ? maybe if I will edit the Contacts.php and change the β€œ0” value with β€œ1” ?

Or I may simulate to have a campaign . . .Mke a false one to see the next error I get.

Anyway, you mentioned you made your own import module; I am not much into coding - actually I desperately want to learn but I do not know were to begin - can you share this import module ? how is this working ? it must be installed side by side with the suiteCRM ?