Advertisement:

Author Topic: Unicode "smartphone emojis" break Preview  (Read 1426 times)

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,157
  • /mɛs/
Unicode "smartphone emojis" break Preview
« on: September 13, 2019, 12:33:55 PM »
Tested with this 2.0.15 right here, 2.1rc2, and the Github HEAD of ~2019-09-01.

Entering a Unicode smiley like "🤔" breaks the Preview function, the preview box is just empty and the following error is displayed across all versions I tested:
Quote
The following error or errors occurred while posting this message:
The message body was left empty.

In 2.1, the very first rendering actually works, but if you preview again, it is empty.


Once you delete the emoji from your (original or quoted) text, Preview works again.


The problem seems to be caused by characters from (at least) the following Unicode blocks:

But not from these:
« Last Edit: October 03, 2019, 02:48:28 AM by shawnb61 »
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 616
Re: Unicode "smartphone emojis" break Preview
« Reply #1 on: September 13, 2019, 04:38:51 PM »
when the preview of quickreplay is used the error didn't happen in 2.1

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,157
  • /mɛs/
Re: Unicode "smartphone emojis" break Preview
« Reply #2 on: September 13, 2019, 05:18:56 PM »
So you're seeing a correct preview and no error message? Only the first time you hit Preview, or does it work every time? (I see the error message every time; the first time I hit Preview, there's a preview, but not when I press Preview again.)

I'm on postgres btw, are you too?
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 616
Re: Unicode "smartphone emojis" break Preview
« Reply #3 on: September 14, 2019, 12:43:33 AM »
The error appears when i use your way,
but when i use the different way the error didn't appear.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,266
    • sbulen on GitHub
Re: Unicode "smartphone emojis" break Preview
« Reply #4 on: October 03, 2019, 02:47:56 AM »
I've seen this on:
 - 2.0 pg
 - 2.1 pg
 - 2.1 mysql

I cannot replicate it on a 2.0 mysql (utf8).   

Albertlast is correct, previewing the quickreply works fine.  The above refers to actual posts. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,266
    • sbulen on GitHub
Re: Unicode "smartphone emojis" break Preview
« Reply #5 on: October 03, 2019, 07:00:11 PM »
This will be fixed in the upcoming 2.0.16.

This was reported a few times, I am going to close all but this one!
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 616
Re: Unicode "smartphone emojis" break Preview
« Reply #6 on: October 04, 2019, 02:08:25 PM »
When you do this for 2.1 too,
would be nice that you assign yourself to this issue,
because i was always thinkg about to try my luck
since no one care.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,266
    • sbulen on GitHub
Re: Unicode "smartphone emojis" break Preview
« Reply #7 on: October 04, 2019, 02:19:57 PM »
Just not addressed yet.  Thanks for logging it here: https://github.com/SimpleMachines/SMF2.1/issues/5804
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,266
    • sbulen on GitHub
Re: Unicode "smartphone emojis" break Preview
« Reply #8 on: December 30, 2019, 11:09:59 PM »
This was fixed in 2.0.16, BUT...  The 2.1 fix isn't merged yet, so keeping this open. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,157
  • /mɛs/
Re: Unicode "smartphone emojis" break Preview
« Reply #9 on: December 31, 2019, 04:15:34 AM »
You're awesome anyway! <3
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline Helgi

  • Newbie
  • *
  • Posts: 9
Re: Unicode "smartphone emojis" break Preview
« Reply #10 on: January 03, 2020, 01:51:19 PM »
Please tell us how you fixed it.

In SMF version 1.1.21, if you inserted a "smartphone emojis", then all text is deleted when sending (which stand in the message after them).

This problem appeared after the site was transferred to UTF-8.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 52,562
Re: Unicode "smartphone emojis" break Preview
« Reply #11 on: January 03, 2020, 01:53:47 PM »
you need to upgrade to SMF 2.0.17 and see if that resolves your issue.

this issue is not related to yours as you are using a different version.

Offline Helgi

  • Newbie
  • *
  • Posts: 9
Re: Unicode "smartphone emojis" break Preview
« Reply #12 on: January 03, 2020, 02:15:17 PM »
Thanks for the answer.

When I upgrade to 2.1, the problem is solved.
But I can not get away from 1.1.21. A lot of handwritten mods that do not yet give a chance to switch to 2 :(

This problem is in SMF 1 in a clean default forum.

Maybe one of the developers will look at the test forum 1.1.21. Suddenly this problem is easy to solve.

All 1.x users will say thank you very much :)

🎅🎄 This sentence on 1.1.21 would have been deleted along with emoji when saved.

Offline m4z

  • 98.8% chimp
  • Localizer
  • Sophist Member
  • *
  • Posts: 1,157
  • /mɛs/
Re: Unicode "smartphone emojis" break Preview
« Reply #13 on: January 03, 2020, 02:20:57 PM »
Maybe one of the developers will look at the test forum 1.1.21. Suddenly this problem is easy to solve.

All 1.x users will say thank you very much :)

🎅🎄 This sentence on 1.1.21 would have been deleted along with emoji when saved.

1.1 is out of support for almost 2 years, and will not receive updates.
"Faith is what you have in things that don't exist."
--Homer Simpson

Offline Helgi

  • Newbie
  • *
  • Posts: 9
Re: Unicode "smartphone emojis" break Preview
« Reply #14 on: January 03, 2020, 03:37:32 PM »
I know it :)

I am ready to privately pay for the solution to the problem :)

Offline live627

  • Developer
  • SMF Hero
  • *
  • Posts: 5,784
  • Gender: Male
    • live627 on Facebook
    • live627 on GitHub
    • live627 on LinkedIn
    • @live627 on Twitter
    • livemods
Re: Unicode "smartphone emojis" break Preview
« Reply #15 on: January 06, 2020, 11:18:55 PM »
Emoji works on your forum? 1.1.21 has nothing to support them.

I suspect your database is on utf8bmb4, in which case, things would be hunky dory.

Online shawnb61

  • Developer
  • SMF Hero
  • *
  • Posts: 2,266
    • sbulen on GitHub
Re: Unicode "smartphone emojis" break Preview
« Reply #16 on: February 13, 2020, 01:43:22 AM »
The 2.0 issue was fixed in 2.0.16.

The 2.1 fix has been merged.  To fix in 2.1, download the latest from Github.

This issue can (finally) be closed...
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp