Hi there.

Thanks for the module, which works fine for drupal-entities.

I had the same issue with webform-submission... which are not handled by this module, so I just wrote something :)

I am not sure if we/you wan't to support every single possible input form, and if this is the way to do this, but I needed the solution as fast as possible, and that was the way to go it seemed.

So here is the patch. If anyone is in the same situation... which emoji in webform submissions "breaking" the site, here you go :D

I would also add some sort of message, so the user knows what happened, but thats another issue.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Rajab Natshah’s picture

Noted Serkan.

Webform is an important one .. We are going to have that.

Rewarded work :)

Rajab Natshah’s picture

Assigned: Unassigned » Rajab Natshah
Status: Active » Needs review
Marc DeLay’s picture

Status: Needs review » Reviewed & tested by the community

After a recent mobile marketing campaign we starting getting multiple errors from tablet and phone users entering emoji in webforms.

We have tested this module and this patch and both are working great for us.

Rajab Natshah’s picture

To be committed.

Mohammed J. Razem’s picture

Hi,

I rerolled the patch to check if webform module is enabled.

Mohammed J. Razem’s picture

Status: Reviewed & tested by the community » Fixed
Mohammed J. Razem’s picture

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

dimexz’s picture

Doesn't work with webform-7.x-4.14, mysql errors like

PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect string value: '\xF0\x9F\x98\x81' for column 'data' at row 1: INSERT INTO {webform_submitted_data} (nid, sid, cid, no, data) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4); Array ( [:db_insert_placeholder_0] => 33 [:db_insert_placeholder_1] => 164 [:db_insert_placeholder_2] => 3 [:db_insert_placeholder_3] => 0 [:db_insert_placeholder_4] => %EMOJISYMBOL% ) in drupal_write_record() (line 7383 of …/includes/common.inc).

P. S.
Even drupal.org can't accept mb4-symbol in comment, had to '%EMOJISYMBOL%' string replace)

Luca Cattaneo’s picture

With 7.x-4.12 I simple change a line of code and it's working perfectly, thanks!

<?php
-- $component_value = &$submission->data[$cid]['value'];
++ $component_value = &$submission->data[$cid][0];
?>