Upload of custom emojis fails


(Marco Jakobs) #1

Hi,

I’d like to add some few custom emojis to my board, but when I want to upload the image I always get this error message:

When I SSH into the server, I see the uploaded GIF in /var/discourse/shared/standalone/uploads/default/_emoji.

What can lead Discourse to that error message if the upload itself was OK? Do I need to respect some other rules for the Emoji image?


#2

Have a look at this: GitHub - eviltrout/trout_emoji: Adds an evil trout emoji to a discourse install

(function() {
  Discourse.Dialect.registerEmoji('trout', '/plugins/trout_emoji/images/trout-square.jpg');
  Discourse.Dialect.registerEmoji('trout', '/plugins/trout_emoji/images/your_other_emoji_image.jpg');
})();

#3

I don’t think this plugin works anymore, in november there has been some rewrite in the emoji section, @ZogStrip made a new plugin few months ago to help us : GitHub - discourse/discourse-emoji: Boilerplate plugin to add custom emojis

What code did you use for your emoji ? Maybe it was a already taken of used an incompatible character
And you don’t have to add the ::. Example : custom1 should work


(Marco Jakobs) #4

OK … but shouldn’t that work without a plugin, or what’s the Admin -> Customize -> Emoji page for?

I did not use taken sequences … i.e. the name “abcdefgh” does also not work. And all the images go to the upload/_emoji folder correctly, but Discourse does not show them on the Emoji page or in the user’s reply emoji selector.


#5

Can you send me one emoji you want to add ? I’ll try on my forum

Have you uncheck the option enforce square emoj in the settings ?


(Marco Jakobs) #6

OK, the option “enforce square emoj” was not unchecked - I did this now but it did not help.

Here’s an example emoji:


#7

Didn’t work for me either. But I can’t add any emoji today too.

Maybe it’s a bug from the upload system in Discourse.


(Marco Jakobs) #8

Hmmm … I’m running on a local server, but maybe that function is broken in the current build?

Strange: I’ve restarted the complete server and a bit later one Emoji made it into the list:

I did it then the other way around: I’ve deleted this one with the wastebin icon. It first disappeared from the page, but when I made a reload:

The emoji was deleted from the _emoji folder on the server, but somehow Discourse still thinks it’s there …


#9

I dont think I can agree that it doesnt work anymore on stable.


(Régis Hanol) #10

Thanks for reporting that issue. I just pushed a fix :strawberry:


(Régis Hanol) #11