Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SELF HOSTED | Error | 500 error after adding emoji to subject line #1029

Closed
vexersa opened this issue Oct 21, 2015 · 9 comments
Closed

SELF HOSTED | Error | 500 error after adding emoji to subject line #1029

vexersa opened this issue Oct 21, 2015 · 9 comments
Labels
bug Issues or PR's relating to bugs

Comments

@vexersa
Copy link

vexersa commented Oct 21, 2015

Hello,

I receive a 500 error after saving an email with an emoji in the subject line.

Here are the error logs:

[2015-10-20 05:01:45] mautic.ERROR: Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "Requested URL not found: /testproxy.php" at /home/mautic/public_html/app/bundles/CoreBundle/Controller/Cller.php line 352 {"exception":"[object] (Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException(code: 0): Requested URL not found: /testproxy.php at /home/mautic/public_html/app/bundles/CoreBundle/Controller/CommonChp:352)"} []
[2015-10-20 10:46:30] mautic.NOTICE: PHP Notice: unserialize(): Error at offset 112 of 186 bytes - in file /home/mautic/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php - at line 58 [] []
[2015-10-20 10:46:30] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Types\ConversionException: "Could not convert database value "a:1:{s:7:"subject";a..." to Doctrine Type array" at /home/mautic/public_html/vendor/doctib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\\DBAL\\Types\\ConversionException(code: 0): Could not convert database value \"a:1:{s:7:\"subject\";a...\" to Doctrine Type array at /homelic_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []
[2015-10-20 10:49:00] mautic.NOTICE: PHP Notice: unserialize(): Error at offset 112 of 186 bytes - in file /home/mautic/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php - at line 58 [] []
[2015-10-20 10:49:00] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Types\ConversionException: "Could not convert database value "a:1:{s:7:"subject";a..." to Doctrine Type array" at /home/mautic/public_html/vendor/doctib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\\DBAL\\Types\\ConversionException(code: 0): Could not convert database value \"a:1:{s:7:\"subject\";a...\" to Doctrine Type array at /homelic_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []
[2015-10-20 11:22:02] mautic.NOTICE: PHP Notice: unserialize(): Error at offset 112 of 186 bytes - in file /home/mautic/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php - at line 58 [] []
[2015-10-20 11:22:02] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Types\ConversionException: "Could not convert database value "a:1:{s:7:"subject";a..." to Doctrine Type array" at /home/mautic/public_html/vendor/doctib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\\DBAL\\Types\\ConversionException(code: 0): Could not convert database value \"a:1:{s:7:\"subject\";a...\" to Doctrine Type array at /homelic_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []
[2015-10-20 11:38:19] mautic.NOTICE: PHP Notice: unserialize(): Error at offset 112 of 186 bytes - in file /home/mautic/public_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ArrayType.php - at line 58 [] []
[2015-10-20 11:38:20] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Types\ConversionException: "Could not convert database value "a:1:{s:7:"subject";a..." to Doctrine Type array" at /home/mautic/public_html/vendor/doctib/Doctrine/DBAL/Types/ConversionException.php line 46 {"exception":"[object] (Doctrine\\DBAL\\Types\\ConversionException(code: 0): Could not convert database value \"a:1:{s:7:\"subject\";a...\" to Doctrine Type array at        /homelic_html/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:46)"} []

I saw another post with a similar issue but in relation to leads.

Is the fix for this the same process? If so, please help me out?

I'm running the latest version.

Thanks!

@vexersa
Copy link
Author

vexersa commented Oct 21, 2015

I have tested by copy and pasting the email subject and body to a new email and everything works as predicted.

I am able to edit the original email by clicking the drop down next to the email and selecting the "Edit" option. However, clicking the email itself produces the 500 error.

To be more succinct:

Attempting to navigate to this URL fails with the 500 error:
/s/emails/view/1

But this URL works as expected:
/s/emails/edit/1

@escopecz
Copy link
Sponsor Member

I have a couple of questions:

  1. What emoji did you use so we could test it?
  2. The first row of your log: Any idea what is testproxy.php and app/bundles/CoreBundle/Controller/Cller.php? Those files are not part of Mautic.

@vexersa
Copy link
Author

vexersa commented Oct 21, 2015

Hello,

  1. &#xfe360 from this page : http://www.emailmarketingtipps.de/2015/05/07/822-emoji-subject-lines-gmail-outlook-cheat-sheet/
  2. No, I'm not sure what this is.

@alanhartless
Copy link
Contributor

It's possible we haven't accounted for that emoji although all standard ones should be. Well look into that.

Please get us the contents of those non-Mautic files so we can examine them on whether it's a security threat we need to deal with. I'm slightly concerned that Symfony is loading app/bundles/CoreBundle/Controller/Cller.php and CommonChp if they are not Mautic. But they look really odd so I'm wondering if it's just a logging and or copy paste issue as well. If you don't find them, then Id say it was just that.

@vexersa
Copy link
Author

vexersa commented Oct 21, 2015

Hello Alan,

I'm browsing my VPS at the moment and don't actually see those files as existing.

[root@thistlebean01 Controller]# pwd
/home/mautic/public_html/app/bundles/CoreBundle/Controller
[root@thistlebean01 Controller]# ls -la
total 124
drwxr-xr-x 3 mautic mautic 4096 Sep 4 00:09 .
drwxr-xr-x 24 mautic mautic 4096 Sep 4 00:12 ..
-rw-r--r-- 1 mautic mautic 27063 Sep 4 00:09 AjaxController.php
-rw-r--r-- 1 mautic mautic 22649 Sep 4 00:09 CommonController.php
-rw-r--r-- 1 mautic mautic 4949 Sep 4 00:09 DefaultController.php
-rw-r--r-- 1 mautic mautic 4307 Sep 4 00:09 ExceptionController.php
-rw-r--r-- 1 mautic mautic 33576 Sep 4 00:09 FormController.php
-rw-r--r-- 1 mautic mautic 695 Sep 4 00:09 MauticController.php
drwxr-xr-x 2 mautic mautic 4096 Sep 4 00:09 SubscribedEvents
-rw-r--r-- 1 mautic mautic 3936 Sep 4 00:09 UpdateController.php

Any suggestions?

@alanhartless
Copy link
Contributor

I think it was just a copy/paste issue then and nothing to worry about.

But for the emoji issue, to restore access, edit the audit_log table and find where object = email and set the details to a:0:{} That should get around the doctrine error.

Exactly which emoji is &#xfe360 on that page?

@alanhartless alanhartless added the pending-feedback PR's and issues that are awaiting feedback from the author label Oct 21, 2015
@vexersa
Copy link
Author

vexersa commented Oct 22, 2015

Great.

The emoji is the animated ?? (not sure if it will show up here)
http://content.screencast.com/users/vexer/folders/Jing/media/9242dd0b-e72a-409f-ad9b-4f4830ac7fa8/2015-10-22_1120.png

With regards to the audit_log fix, please could you let me know which field(s) I need to change/update?

Please see image below:
Image of phpMyAdmin

It appears there are quite a few duplicates for email ID 1?

@alanhartless
Copy link
Contributor

Try running this query to see if it reveals any broken serialized strings.

select * from audit_log where details REGEXP '^a.*[^}]$'

(if you used a table prefix, prepend it to audit_log)

If it finds bad entries, just replace the details contents with a:0:{}

@vexersa
Copy link
Author

vexersa commented Oct 29, 2015

Great. Thanks.

Here is the SQL query I used in the end:

UPDATE audit_log SET details = REPLACE(details, '^a.​_[^}]$', 'a:0:{}') WHERE details REGEXP '^a._​[^}]$';

However, the 500 error when viewing that particular email still shows up. Anything else I can investigate?

@escopecz escopecz added bug Issues or PR's relating to bugs and removed pending-feedback PR's and issues that are awaiting feedback from the author labels Jan 6, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs
Projects
None yet
Development

No branches or pull requests

4 participants