When I try to edit an existing contact’s field, like “City” for example, and then hit Apply or even Save and Close, I get a 500 Internal Server Error. Help!
Running Mautic V1.4.1.
Error Logs:
[2016-07-01 04:20:05] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALDBALException: “An exception occurred while executing ‘UPDATE leads SET lastname = ?, company = ?, position = ?, language = ?, timezone = ?, location = ?, phone = ?, mobile = ?, fax = ?, address1 = ?, address2 = ?, city = ?, state = ?, zipcode = ?, country = ?, website = ?, registration_status = ?, expiration_date = ?, registration_action = ?, days_to_close = ?, owner_assigned_date = ?, harvardo_email_subscripti = ?, salutation = ?, persona = ?, owner_id1 = ?, notes1 = ?, close_date = ?, became_an_opportunity_dat = ?, became_a_marketing_qualif = ?, registration_message = ?, owner_id = ?, became_a_sales_qualified = ?, create_date = ?, became_an_evangelist_date = ?, hubspot_score = ?, became_a_customer_date = ?, became_a_subscriber_date = ?, became_an_other_lifecycle = ?, number_of_employees = ?, annual_revenue = ?, industry = ?, twitter_username = ?, follower_count = ?, twitter_profile_photo = ?, most_recent_social_click = ?, linkedin_bio = ?, twitter_bio = ?, linkedin_connections = ?, klout_score = ?, email_confirmation_status = ?, emails_delivered = ?, opted_out_of_email_harvar = ?, opted_out_of_email_market = ?, emails_opened = ?, emails_clicked = ?, emails_bounced = ?, opted_out_of_all_email = ?, last_email_name = ?, last_email_send_date = ?, last_email_open_date = ?, last_email_click_date = ?, first_email_send_date = ?, first_email_open_date = ?, first_email_click_date = ?, first_page_seen = ?, last_page_seen = ?, time_of_first_visit = ?, time_last_seen = ?, time_of_last_session = ?, currently_in_workflow = ?, original_source_data_1 = ?, original_source_data_2 = ?, first_referring_site = ?, last_referring_site = ?, recent_conversion_page_ti = ?, recent_conversion_date1 = ?, twitter = ?, facebook = ?, googleplus = ?, skype = ?, linkedin = ?, instagram = ?, foursquare = ? WHERE id = ?’ with params [”", “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “Ashburn”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “2016-06-29 17:00”, “2016-06-29 17:00”, “”, “43”, “2016-06-29 17:00”, “2016-06-26 17:00”, “2016-06-29 17:00”, “”, “2016-06-29 20:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “”, “”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “”, “”, “”, “”, “”, “”, “2016-06-26 17:00”, “”, “”, “”, “”, “”, “”, “”, 512]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ffmarketing_ss.leads, CONSTRAINT FK_179045527E3C61F9 FOREIGN KEY (owner_id) REFERENCES users (id) ON DELETE SET NULL)" at /home/www/marketing.freeformagency.com/seniorstarautomation/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 {“exception”:“object REFERENCES users (id) ON DELETE SET NULL) at /home/www/marketing.freeformagency.com/seniorstarautomation/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ffmarketing_ss.leads, CONSTRAINT FK_179045527E3C61F9 FOREIGN KEY (owner_id) REFERENCES users (id) ON DELETE SET NULL) at /home/www/marketing.freeformagency.com/seniorstarautomation/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855)”} []
When I try to edit an existing contact’s field, like “City” for example, and then hit Apply or even Save and Close, I get a 500 Internal Server Error. Help!
Running Mautic V1.4.1.
Error Logs:
[2016-07-01 04:20:05] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALDBALException: “An exception occurred while executing ‘UPDATE leads SET lastname = ?, company = ?, position = ?, language = ?, timezone = ?, location = ?, phone = ?, mobile = ?, fax = ?, address1 = ?, address2 = ?, city = ?, state = ?, zipcode = ?, country = ?, website = ?, registration_status = ?, expiration_date = ?, registration_action = ?, days_to_close = ?, owner_assigned_date = ?, harvardo_email_subscripti = ?, salutation = ?, persona = ?, owner_id1 = ?, notes1 = ?, close_date = ?, became_an_opportunity_dat = ?, became_a_marketing_qualif = ?, registration_message = ?, owner_id = ?, became_a_sales_qualified = ?, create_date = ?, became_an_evangelist_date = ?, hubspot_score = ?, became_a_customer_date = ?, became_a_subscriber_date = ?, became_an_other_lifecycle = ?, number_of_employees = ?, annual_revenue = ?, industry = ?, twitter_username = ?, follower_count = ?, twitter_profile_photo = ?, most_recent_social_click = ?, linkedin_bio = ?, twitter_bio = ?, linkedin_connections = ?, klout_score = ?, email_confirmation_status = ?, emails_delivered = ?, opted_out_of_email_harvar = ?, opted_out_of_email_market = ?, emails_opened = ?, emails_clicked = ?, emails_bounced = ?, opted_out_of_all_email = ?, last_email_name = ?, last_email_send_date = ?, last_email_open_date = ?, last_email_click_date = ?, first_email_send_date = ?, first_email_open_date = ?, first_email_click_date = ?, first_page_seen = ?, last_page_seen = ?, time_of_first_visit = ?, time_last_seen = ?, time_of_last_session = ?, currently_in_workflow = ?, original_source_data_1 = ?, original_source_data_2 = ?, first_referring_site = ?, last_referring_site = ?, recent_conversion_page_ti = ?, recent_conversion_date1 = ?, twitter = ?, facebook = ?, googleplus = ?, skype = ?, linkedin = ?, instagram = ?, foursquare = ? WHERE id = ?’ with params [”", “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “Ashburn”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “2016-06-29 17:00”, “2016-06-29 17:00”, “”, “43”, “2016-06-29 17:00”, “2016-06-26 17:00”, “2016-06-29 17:00”, “”, “2016-06-29 20:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “”, “”, “2016-06-29 21:00”, “2016-06-29 21:00”, “2016-06-29 21:00”, “”, “”, “”, “”, “”, “”, “2016-06-26 17:00”, “”, “”, “”, “”, “”, “”, “”, 512]: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ffmarketing_ss.leads, CONSTRAINT FK_179045527E3C61F9 FOREIGN KEY (owner_id) REFERENCES users (id) ON DELETE SET NULL)" at /home/www/marketing.freeformagency.com/seniorstarautomation/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php line 91 {“exception”:“object REFERENCES users (id) ON DELETE SET NULL) at /home/www/marketing.freeformagency.com/seniorstarautomation/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php:91, PDOException(code: 23000): SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (ffmarketing_ss.leads, CONSTRAINT FK_179045527E3C61F9 FOREIGN KEY (owner_id) REFERENCES users (id) ON DELETE SET NULL) at /home/www/marketing.freeformagency.com/seniorstarautomation/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php:855)”} []
Did you ever get this resolved? I am having the same issue.
I found that mautic did not like any of my field alias to have a “_id” ending.
I was using a field with the alias org_id. When i changed it to org_id1 the api call worked.
Hope that helps.