-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Error on new wiki page creation with emoji #2665
Comments
@Gauravano did any text cause this? specific text? |
Logs!
|
@jywarren only text used by @NiklasJordan is causing this issue if we are using plain text no issue is encountered. By viewing logs and text, I guess it's clear that body is not processed. Also, markdown in content seems bad to me. What do you think @jywarren? |
Maybe if we can get the full text we can try filtering out the sections
that are causing trouble...
…On Fri, Apr 27, 2018, 1:14 PM Gaurav Sachdeva ***@***.***> wrote:
@jywarren <https://github.com/jywarren> only text used by @NiklasJordan
<https://github.com/NiklasJordan> is causing this issue if we are using
plain text no issue is encountered. By viewing logs and text, I guess it's
clear that body is not processed. Also, markdown in content seems bad to
me. What do you think @jywarren <https://github.com/jywarren>?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2665 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ8opNnujVo1hW1LQZBhh8gCdo5gtks5ts1G7gaJpZM4Tqp__>
.
|
ok, I will try this |
@NiklasJordan - can you send us the full text in a Gist using http://gist.github.com so we can try to post it? It's strange but there seem to be characters in the text causing the app to choke... not your fault but we'd like to try to reproduce it to fix it! Thanks for your help with this! |
Hej @jywarren, sorry for the late answer. Sure, I've created the gist here: https://gist.github.com/NiklasJordan/da02086827b6f01c0429bacf8cc5ea96 |
awesome, thank you!!!
…On Tue, May 1, 2018 at 10:38 AM, Niklas Jordan ***@***.***> wrote:
Hej @jywarren <https://github.com/jywarren>, sorry for the late answer.
Sure, I've created the gist here: https://gist.github.com/NiklasJordan/
da02086827b6f01c0429bacf8cc5ea96
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2665 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJyWtwu-qshcswXAv6n-7fvBW6LTbks5tuHNSgaJpZM4Tqp__>
.
|
I got it why this is happening. This is happening because of the using of emojis. Emojis take four byte to store data in mysql and is of utf8mb4 encoding which is a utf8 that take 4 byte. Normally by default it uses 3 byte to store data and use normal utf8 encoding. We can use utf8mb4 for this particular table to support emojis. |
Great investigative work! @icarito - is there any downside to changing the
encoding of the revisions table to accommodate emojis?
In the meantime, we could replace the emojis with `:smile :` (space added so it doesn't actually form an emoji) format
strings, which are auto-replaced (due to a recent new feature) with the
emoji.
OR we could try to auto-filter emojis and convert them to their `:smile :`
format strings, and not change the table? Pros, cons?
|
@icarito any thoughts here -- thank you! |
Sorry I missed this question! Can this be done in a regular migration? We should definitively test this in staging or unstable instances. |
I think it could be. But would you prefer to bypass it by filtering and
replacing with the :____: style emoji? Pros/cons from a storage or
maintenance perspective?
…On Thu, May 10, 2018 at 2:47 PM, Sebastian Silva ***@***.***> wrote:
Sorry I missed this question! Can this be done in a regular migration? We
should definitively test this in staging or unstable instances.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#2665 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABfJ1dP73csm-ygLJyNVi_gG0k60nsmks5txIslgaJpZM4Tqp__>
.
|
I think it makes the most sense to switch to UTF-8, Unicode (utf8_unicode_ci). This should accommodate most languages if not all. But - migrating could break characters if they are not correctly encoded - could lead to mangling some characters at migration time. After migration in Storage and maintenance should be about the same. |
Yes we can do this through migration. If you want i can give it a shot. |
@namangupta01 - yes, please - can you try opening a PR for this and we can force push it to @NiklasJordan i'm sorry this is taking so long! With @Gauravano and @namangupta01 and @icarito's sleuthing, we can now get a non-emoji version up: https://publiclab.org/first-contribution If you'd like to make an edit to that page to get credit, that'd be awesome :-) I'll check back on the last issue now! |
While trying to reproducing this on my local machine i am getting no error but i am also not getting any text after the emojis in the page i.e all the content after the emojis vanishes. |
https://github.com/railsmachine/utf8mb4_conversion_scripts has a possible solution! |
Hi @jywarren I am working today on this will create a pr for this for comment today. |
Thinking that this may be fixed in #3007 and/or with a follow-up applying this to nodes. |
@NiklasJordan said:
Let's try to reproduce this -- @Gauravano has already. I'll look through logs but we should try to make a functional test that catches this...
Thanks all!
The text was updated successfully, but these errors were encountered: