← Back to team overview

mahara-contributors team mailing list archive

[Bug 1408542] Re: TinyMCE emoticons are not displayed in TinyMCE 4

 

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.

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1408542

Title:
  TinyMCE emoticons are not displayed in TinyMCE 4

Status in Mahara ePortfolio:
  Confirmed
Status in Mahara 1.10 series:
  Confirmed
Status in Mahara 15.04 series:
  Confirmed

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/plugins/emotions/img/ ; in version 1.10 they are in
  /js/tinymce/plugins/emoticons/img/ folder.

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1408542/+subscriptions


References