Emoji Plugin Irregularity

AI-generated summary

In the Bug category titled “Emoji Plugin Irregularity”, ColdSun reported an issue with their custom FontAwesome emoji plugin where emoji icons displayed correctly in topic titles and previews but reverted to text codes (e.g., :emoji-here:) in the post body shortly after submission. Despite no errors appearing in logs or the browser console, the behavior was inconsistent. cpradio suggested the implementation was outdated, pointing to an overhauled method used in their own plugin as a reference. ColdSun acknowledged the outdated method but questioned why it functioned partially (titles/previews) before failing, noting they intended to switch to the new approach anyway. Upon testing the recommended register_emoji method, ColdSun initially observed the same reversion issue. However, the problem was ultimately resolved after rebuilding and rebaking all posts, confirming the emoji now display correctly throughout the post body.

Background
I’ve created a test plugin to familiarize myself with adding custom emoji. During the process, I decided to add quite a few emoji (most everything from fontawesome) as an exercise. The plugin can be located at: GitHub - ColdSunERA/fa-emoji · GitHub

Issue
Everything worked as intended initially. Went out to dinner, came back a few hours later to find that the emoji in past (and new) posts only displays correctly in the topic title, and the preview. The body of the message (once submitted), displays the emoji for a second or two before it defaults back to the :emoji-here: text.

An example of the issue can be seen here:
https://forums.ego.ninja/t/fa-adjust-fa-emoji-not-displaying-in-posts/22

Additional Notes
There is no errors in the log. No related errors in Google’s dev console.

It looks like the implementation you are using for adding emoji’s is outdated. It was overhauled a while ago.

Here is an example using the overhauled technique.

5 Likes

Thanks :grinning:
I was aware that there was a newer way to display the emoji but was unaware that the previous way was no longer supported. It’ll be easy enough to switch over to the new method (which I’ll be doing tonight). For that I thank you.

Any idea why the previous way still works for the topic titles, previews, and the initial page submission but later reverts? Not that I plan on using the outdated method (I’m not), I’m just more interested in the cause of the irregularities.

Using register_emoji is producing the same results as the old method.
Topic titles show the emoji. The preview shows the emoji.
The final post once submitted shows the emoji for a second before turning back into the text version.

Added:
After rebuilding/rebaking all of the posts, it is working correctly.

Thanks :slight_smile:

3 Likes