error 500 on leads page after editing lead

My leads page gives an error 500 in both the “cards” and “table” mode when the edited contact is shown on the page (this depends on pagination).



This started after editing to add some social accounts to the lead. After saving the lead there was an error balloon in the screen saying something like “Lead with id xxx not found”.



The last few errors in the log:

Code:
[2015-06-06 09:28:05] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: "Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array" at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

[2015-06-06 09:28:15] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: “Could not convert database value “a:1:{s:7:“Twitter”;a…” to Doctrine Type array” at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {“exception”:"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value “a:1:{s:7:“Twitter”;a…” to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

[2015-06-06 09:28:18] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: “Could not convert database value “a:1:{s:7:“Twitter”;a…” to Doctrine Type array” at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {“exception”:"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value “a:1:{s:7:“Twitter”;a…” to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

[2015-06-06 09:28:30] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: “Could not convert database value “a:1:{s:7:“Twitter”;a…” to Doctrine Type array” at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {“exception”:"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value “a:1:{s:7:“Twitter”;a…” to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

My leads page gives an error 500 in both the “cards” and “table” mode when the edited contact is shown on the page (this depends on pagination).

This started after editing to add some social accounts to the lead. After saving the lead there was an error balloon in the screen saying something like “Lead with id xxx not found”.

The last few errors in the log:

[2015-06-06 09:28:05] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: "Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array" at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

[2015-06-06 09:28:15] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: "Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array" at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

[2015-06-06 09:28:18] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: "Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array" at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

[2015-06-06 09:28:30] mautic.CRITICAL: Uncaught PHP Exception DoctrineDBALTypesConversionException: "Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array" at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\DBAL\Types\ConversionException(code: 0): Could not convert database value "a:1:{s:7:"Twitter";a..." to Doctrine Type array at /home/soetkees/domains/soetkees.nl/public_html/mautic/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

After emptying the social fields in the database (the fields social_cache, facebook and twitter) the error is gone.
It might have got something to do with the social_cache field containing a certain character: :sunny:

The value was:

a:1:{s:7:"Twitter";a:3:{s:7:"profile";a:8:{s:13:"profileHandle";s:14:"traveloclockNL";s:4:"name";s:17:"Daphne Groeneveld";s:8:"location";s:26:"The Hague, The Netherlands";s:11:"description";s:157:"Blogger http://t.co/cSvzK7fgS1 | Fotografeert graag  | Schrijft | PR Baltus Communications | Dol op tijdschriften | London fan | Avontuurlijk | Loves water |";s:3:"url";s:22:"http://t.co/cSvzK7fgS1";s:9:"time_zone";s:9:"Amsterdam";s:4:"lang";s:2:"nl";s:12:"profileImage";s:68:"https://pbs.twimg.com/profile_images/583760250358075392/DQzBmn_z.jpg";}s:8:"activity";a:3:{s:6:"tweets";a:10:{i:0;a:4:{s:5:"tweet";s:70:"I'm at Copacabana in Scheveningen, netherlands https://t.co/Ez0dbwMobw";s:3:"url";s:54:"https://twitter.com/48977276/status/606860635142549504";s:11:"coordinates";a:2:{s:4:"type";s:5:"Point";s:11:"coordinates";a:2:{i:0;d:4.26995670999999976658045852673240005970001220703125;i:1;d:52.10732402000000007546987035311758518218994140625;}}s:9:"published";s:30:"Fri Jun 05 16:30:25 +0000 2015";}i:1;a:4:{s:5:"tweet";s:127:"La playa en la Haya! Viva!! // ☀️

Hi Menolo,

You’re right. There’s an issue with storing 4 byte emoji’s in the database which causes the serialized string to become corrupt. We’ve got a fix coming in the next release.

Thanks,
Alan

[quote=1689:alanhartless]Hi Menolo,

You’re right. There’s an issue with storing 4 byte emoji’s in the database which causes the serialized string to become corrupt. We’ve got a fix coming in the next release.

Thanks,
Alan[/quote]
Cool, thanks Alan.