Some emojis broken after 1.5 -> 1.6.1 update


(ljpp) #1

Just upgraded my site from 1.5.x to 1.6.1 and noticed that at least one type of emoji appears now broken. Could have broken earlier, I am not sure, but noticed now.

Previously there has been emoji…

:slightly_smiling:

…which has now changed to…

:slight_smile:

…thus all the posts with the original markup now have broken emoji images.

Any suggestions how to fix?


(Sam Saffron) #2

We can fix it in latest by adding an alias, but that will not help you if you want to stick to stable (at least for 3 more months)

Easiest fix for you is to upload a custom emoji for slightly smiling and maybe rebake.


(Matt Palmer) #3

Would a remap of :slightly_smiling: to :slight_smile: do the trick?


(Jeff Atwood) #4

Is there anything simple we can do here @eviltrout?


(ljpp) #5

Can you guys confirm whether this is the only smiley with a recent markup change?

@mpalmer Yeah, I was thinking a simple database operation might do the trick, but will need specific instructions.


(Sam Saffron) #6

That is what @mpalmer mentioned … something along the lines of

cd /var/discourse
 ./launcher enter app
discourse remap :slightly_smiling: :slight_smile: 
rake posts:rebake

you would need the rebake cause that sub would only catch raw.


(Jeff Atwood) #7

@techapj where are we at on the rebake command that can target only posts

  • containing a specific exact-match string (no regex)
  • matching a regex

?

I feel like rebake is too painful at the moment since it is always global, and that’s overkill 99% of the time as only certain posts really need rebaking…


(Arpit Jalan) #8

Will get it done this week.


(ljpp) #9

Sorry for being a database n00b, but whats the best practice to backup (and potentially restore) the database before running this kind of mass operations?


(Sam Saffron) #10

Use built in backup/restore


(rizka) #11

I can confirm that I noticed this for the first time months ago, so it has nothing to do with the 1.6 transition. It was equally broken in the 1.5 version of the site. I was looking at my oldest posts and it appears there often as it’s one of favourite emojis. It dates back to the time when :slightly_smiling: was changed to be :slight_smile:.

Still, keep searching for a fix so that my old posts show as intended. :slight_smile:


(ljpp) #12

Yeah, I also investigated the timeline and the change seems to have happened already in March-April, so actually late in the 1.5 development branch and not in the 1.6 as the topic suggests.

As said in the opening post, I was not sure regarding the timeline but noticed it now when doing some smoke testing after upgrading to 1.6.1.


(ljpp) #13

Sam’s solution seems to tackle the issue. Only thing I am left wondering is that are there other emoji with changes, or was this issue limited to sligtly smiling?


(Robin Ward) #14

I think rebaking is best here. I could have the parser redirect one command to the other, but those posts are already baked.

I could put a copy of the old filename on disk, but then it will miss updates when we update the emoji sets.


(Arpit Jalan) #15

Done:


… and now the command for rebake will be:

rake posts:rebake_match[":slight_smile:"]

(Jeff Atwood) #16