@CodeAndWeb opened this Issue on June 7th 2019

Adding an emoji to the annotation text breaks the annotations view and does not show any annotations.

Reproduce: Create an annotation with an emoji. E.g. "This kills your annotations 💣💣💣"

What happens?

The annotations are serialized and inserted in to the matomo_option table. But the serialized string is truncated at the first emoji. This is because utf8_general_ci is limited in the character range. The values can't be retrieved from the database.

Manual fix for users:

Find the entry < site id>_annotations in the matomo_option and fix the serialized php data set. Replace < site id> with the id of your site.

Fix:

My preferred solution would be to use utf8mb4_general_ci instead - this should support all characters.

@Findus23 commented on June 7th 2019 Member

My preferred solution would be to use utf8mb4_general_ci instead - this should support all characters.

That's the plan (https://github.com/matomo-org/matomo/issues/9785), but as it is a breaking change and may take a while to upgrade this can only be done in Matomo 4

@tsteur commented on June 7th 2019 Member

Was just going to mention the same. Will mark it as a duplicate.

@CodeAndWeb commented on June 7th 2019

A non breaking change would be to check the strings for invalid characters and report an error instead of corrupting the database with an invalid entry and trashing all existing annotations.

Not everybody is able to change the database content and fix the broken php data.

This is not just a small inconvenience that the entries are not displayed - they are simply lost.

This Issue was closed on June 7th 2019
Powered by GitHub Issue Mirror