TinyMCE emoticons are not displayed in TinyMCE 4
Bug #1408542 reported by
Stéphane
This bug affects 2 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Mahara |
Fix Released
|
High
|
Robert Lyon | ||
1.10 |
Fix Released
|
High
|
Aaron Wells | ||
15.04 |
Fix Released
|
High
|
Robert Lyon |
Bug Description
Upgrading Mahara from 1.9.x to 1.10.x causes a problem with all emoticons used prior to the upgrade. No image is displayed; the link is broken.
After analyzing the situation, the folder comtaining images as been renamed. In version 1.9.x, images were in /js/tinymce/
To correct the problem, I copied the img folder in a new folder emotions... but it's not an elegant solution. Best solution is not to change de the name of the folder or to add a script to correct in the database the path to the emoticon images.
Changed in mahara: | |
status: | New → Confirmed |
importance: | Undecided → Medium |
milestone: | none → 15.04.0 |
summary: |
- tinymce emoticon problem + TinyMCE emoticons are not displayed in TinyMCE 4 |
tags: | added: tinymce |
Changed in mahara: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Changing the priority from "Medium" to "High" because it can result in a bunch of broken images everywhere.
TinyMCE stores the emoticons in the text fields as hard-coded links, e.g. '<img src="http:// vegas.wgtn. cat-it. co.nz/mahara/ htdocs/ js/tinymce/ plugins/ emoticons/ img/smiley- cool.gif" alt="" />'. We could do some kind of database update that searches through all the user text fields and rewrites the smiley paths. Or we could patch TinyMCE so that it stores an abstract placeholder instead, and then when we display the text, run it through a filter that replaces the placeholder with the actual image URL.
It's tempting to just move the images back to their original path (which we could do by renaming the plugin from "emoticons" back to "emotions"), but the problem, is that now we've got sites out there using Mahara 1.10, with hard-coded links to the new path! So ultimately, in 15.04, we will have to do a database update to rewrite all these to the new path. :-\
Since we want to avoid database updates in minor releases, I propose the following fixes for 1.10 and 15.04:
1.10: We put a second copy of the images under the original location, htdocs/ js/tinymce/ plugins/ emotions
15.04: We do a database script that locates instances of the old emoticon URLs and rewrites them to the new emoticon URL.