Comment 1 for bug 1408542

Revision history for this message
Aaron Wells (u-aaronw) wrote :

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.