bug
avatar dgrammatiko
dgrammatiko
9 Nov 2014

Steps to reproduce the issue

Add a new PR with a title and in the description add an emoticon

Expected result

Description with emoticon code or an icon

Actual result

The description breaks at the first emoticon and no further text gets in the database

System information (as much as possible)

PR: joomla/joomla-cms#5058
Tracker: http://issues.joomla.org/tracker/joomla-cms/5058

Additional comments

avatar dgt41 dgt41 - open - 9 Nov 2014
avatar b2z b2z - change - 20 Nov 2014
Labels Added: bug
avatar allenzhao
allenzhao - comment - 20 Dec 2014

Do we have more details on it?

avatar b2z
b2z - comment - 11 Jan 2015

@dgt41 I've just tested and everything is good. See the prove:
PR jtester/tests#50
Tracker http://issues.joomla.org/tracker/jtests/50

avatar dgt41
dgt41 - comment - 11 Jan 2015

Seems to be ok now. I will close this one


This comment was created with the J!Tracker Application at issues.joomla.org/jtracker/556.
avatar dgt41 dgt41 - close - 11 Jan 2015
avatar dgt41 dgt41 - close - 11 Jan 2015
avatar dgt41 dgt41 - change - 11 Jan 2015
Status New Closed
Closed_Date 0000-00-00 00:00:00 2015-01-11 21:03:29
avatar dgt41
dgt41 - comment - 19 Jan 2015

Ok I came across to this problem once again!
I realize that the problem isn’t the bot but maybe the editor of jissues?
Anyway these are two links and two images that show the problem
on github joomla/joomla-cms#5815
screen shot 2015-01-18 at 18 26 00

And on jissues http://issues.joomla.org/tracker/joomla-cms/5815

screen shot 2015-01-18 at 18 27 17

As you can see on Jissues nothing gets parsed after the emoticon!

avatar dgt41 dgt41 - reopen - 19 Jan 2015
avatar dgt41 dgt41 - reopen - 19 Jan 2015
avatar dgt41 dgt41 - change - 19 Jan 2015
Status Closed New
avatar zero-24
zero-24 - comment - 19 Jan 2015

Confirmed. The strange ist the following image. If we follow the diff on the Tracker the bot added the lines after the emoticon but it is not there:

diff

avatar b2z
b2z - comment - 19 Jan 2015

I can't fully understand at what moment it happens.

@dgt41 can you describe step by step what you did and I will try to reproduce. Thank you.

BTW this emotion looks quite strange on GitHub.

avatar mbabker
mbabker - comment - 19 Jan 2015

My two hunches right now are that our controller isn't handling filtering it very well (which may mean an issue in Joomla/Filter) or the GitHub API isn't handling it very well. To debug, I'd suggest dumping the data just before we send a request to the API to render the markdown data and see what the description field contains. If it's good before that point, then that seems to point to either a GitHub API issue or an issue with Joomla/GitHub and Joomla/HTTP and handling the request for that; whereas if it is missing content before that point then it would seem to point to a filtering issue.

avatar dgt41
dgt41 - comment - 19 Jan 2015

@zero-24 The strange character should be unicode U+1F603 the third one in this list
Any idea where is the mapping for emoticons?

avatar dgt41
dgt41 - comment - 19 Jan 2015

@b2z Steps to reproduce:
Create a new PR on github, some title etc but in description add an emoticon with its Unicode (not as :smilr:)
Then let the bot fetch it
and then try to access it in Jissues

avatar b2z
b2z - comment - 20 Jan 2015

but in description add an emoticon with its Unicode

May be this is the problem. I will try to reproduce.

avatar b2z
b2z - comment - 1 Feb 2015

@dgt41 I am trying to reproduce, but do not understand how to add the emotion in Unicode. I tried to use U+1F603 but it is only text. Please explain how to use it :)

avatar dgt41
dgt41 - comment - 1 Feb 2015

@b2z can you copy paste

avatar b2z
b2z - comment - 1 Feb 2015

Ah ok got it now. ????

avatar b2z
b2z - comment - 1 Feb 2015

So I have tested and I do not know how to fix it :( I traced the data till the updateObject() method and here is how the fields looks like just before the query statement execution:

emoji_data

As you can see description and description_raw are good. But after saving in the DB they looks like this:

emoji_data_db

:(

avatar mbabker
mbabker - comment - 1 Feb 2015

Can the database not handle the characters that are getting printed after the closing tag? The table is defined with a utf8 charset, the columns in question are utf8_general_ci collation and utf8 encoded.

avatar b2z
b2z - comment - 1 Feb 2015

Seems so. I trying to Google for it, but nothing found at the moment.

avatar dgt41
dgt41 - comment - 2 Feb 2015

Isn't this a filtering problem? My guess is tha <g-emoji is not a valid, known tag in the filters and thus rejected.

avatar mbabker
mbabker - comment - 2 Feb 2015

It wouldn't make it to the database if there were a filtering problem.

avatar dgt41
dgt41 - comment - 2 Feb 2015

@mbabker you re right, of course...
Found this:
create table MyEmoji (emojicolumn VARCHAR(255) CHARACTER SET utf8mb4) default character set utf8mb4;

Emoji is represented as 4 byte characters. That’s mean your MySQL table charset should be set as utf8mb4.

avatar b2z
b2z - comment - 2 Feb 2015

If we are running MySQL 5.5.3+ then we could switch to utf8mb4.

avatar mbabker
mbabker - comment - 2 Feb 2015

We're on 5.6 on the server.

avatar b2z
b2z - comment - 1 Mar 2015

@mbabker does it make sense to switch to utf8mb4 ?

avatar mbabker
mbabker - comment - 1 Mar 2015

I don't see an issue with it.

avatar b2z
b2z - comment - 2 Mar 2015

Then close it :tongue:

avatar mbabker
mbabker - comment - 2 Mar 2015

How about a PR to update the default schema to use the utf8mb4 character set :stuck_out_tongue:

avatar b2z
b2z - comment - 2 Mar 2015

@mbabker you are so kind :grimacing:

avatar mbabker mbabker - change - 11 Apr 2015
Status New Closed
Closed_Date 2015-01-11 21:03:29 2015-04-11 10:33:57
avatar mbabker mbabker - close - 11 Apr 2015
avatar mbabker mbabker - close - 11 Apr 2015
avatar mbabker
mbabker - comment - 11 Apr 2015

So with any luck, ????will work now...

Add a Comment

Login with GitHub to post a comment