# 500 Internal Server Error when trying to edit any contact field

**URL:** https://forum.mautic.org/t/500-internal-server-error-when-trying-to-edit-any-contact-field/4124
**Category:** Product Support
**Created:** [July 1, 2016, 4:34am UTC](https://forum.mautic.org/t/500-internal-server-error-when-trying-to-edit-any-contact-field/4124 "2016-07-01T04:34:17Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![freeformagency](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@freeformagency](https://forum.mautic.org/u/freeformagency)
#### Post date: [July 1, 2016, 4:34am UTC](https://forum.mautic.org/t/500-internal-server-error-when-trying-to-edit-any-contact-field/4124/1 "2016-07-01T04:34:17Z")

</div>

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)”} []

---

<div class="post-metadata">

### Author: ![freeformagency](https://avatars.discourse-cdn.com/v4/letter/f/e9c0ed/32.png) [@freeformagency](https://forum.mautic.org/u/freeformagency)
#### Post date: [July 1, 2016, 4:34am UTC](https://forum.mautic.org/t/500-internal-server-error-when-trying-to-edit-any-contact-field/4124/2 "2016-07-01T04:34:17Z")

</div>

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)”} []

---

<div class="post-metadata">

### Author: ![mingo3369](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mingo3369](https://forum.mautic.org/u/mingo3369)
#### Post date: [July 29, 2016, 9:15pm UTC](https://forum.mautic.org/t/500-internal-server-error-when-trying-to-edit-any-contact-field/4124/3 "2016-07-29T21:15:04Z")

</div>

Did you ever get this resolved? I am having the same issue.

---

<div class="post-metadata">

### Author: ![mingo3369](https://avatars.discourse-cdn.com/v4/letter/m/7993a0/32.png) [@mingo3369](https://forum.mautic.org/u/mingo3369)
#### Post date: [July 29, 2016, 9:58pm UTC](https://forum.mautic.org/t/500-internal-server-error-when-trying-to-edit-any-contact-field/4124/4 "2016-07-29T21:58:32Z")

</div>

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.
