Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-78745

tinyMCE does not link Glossary entries when concept has diacritics

XMLWordPrintable

    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MOODLE_401_STABLE, MOODLE_402_STABLE
    • MDL-78745-401
    • MDL-78745-402
    • MDL-78745-master
    • Hide
      1. Log in as admin
      2. Navigate to User Preferences >> Editor preferences
      3. Select TinyMCE as the text editor, and save the changes.
      4. Navigate to Administration >> Plugins >> Filters >> Manage filters
      5. Activate Glossary auto-linking
      6. Create a new course
      7. Turn on the Edit mode.
      8. Add "Glossary" activity with any name. Save & display.
      9. Add a new entry with:
        Concept: pâté
        Definition: A soft food, usually made of meat or fish, that you spread on bread, etc.
        Tick the "This entry should be automatically linked" checkbox in the Auto-linking section.
      10. Add "Text and media area" resource with:
        Text: I had liver pâté for lunch.
      11. Back to the course page
      12. Verify that the pâté word is linked to the glossary entry.
      Show
      Log in as admin Navigate to User Preferences >> Editor preferences Select TinyMCE as the text editor, and save the changes. Navigate to Administration >> Plugins >> Filters >> Manage filters Activate Glossary auto-linking Create a new course Turn on the Edit mode. Add "Glossary" activity with any name. Save & display. Add a new entry with: Concept: pâté Definition: A soft food, usually made of meat or fish, that you spread on bread, etc. Tick the "This entry should be automatically linked" checkbox in the Auto-linking section. Add "Text and media area" resource with: Text: I had liver pâté for lunch. Back to the course page Verify that the pâté word is linked to the glossary entry.
    • 2
    • Team Hedgehog 2023 Sprint 3.2

      Steps to reproduce
      Using the ATTO text editor
      Create Glossary entry: concept: pâté
      definition: a soft food, usually made of meat or fish, that you spread on bread, etc.
      Create a test page with text: I had liver pâté for lunch.
      Check that the word "pâté" is correctly linked to the Glossary entry for pâté.

      Now switch to the TinyMCE editor
      Purge caches
      Edit the text in the test page to : 
      I had liver pâté for lunch. It was lovely.
      Save and display: the link for the word "pâté" is no longer active.
      Edit the test page again, in the TinyMCE editor click Tools | Source code
      you can see: <p>I had liver pâté for lunch. It was lovely.</p>
      The characters with diacritics have been converted to their html entities... the result is that the Glossary links will no longer work!

      Provisional hack to solve this:
      If you have the necessary capabilities on your Moodle site, go to file:
      MYMOODLE\lib\editor\tiny\js\tinymce\tinymce.js
      go to line 6665
      replace: default: 'named'
      with: default: 'raw'
      save tinymce.js
      Purge caches
      Edit the test page again, in the TinyMCE editor click Tools | Source code
      you can see that the characters with diacritics are displayed correctly:
      <p>I had liver pâté for lunch. It was lovely.</p>
      Save the test page and check that the glossary link to the word "pâté" has been restored.

      Remarks
      This bug in TinyMCE may have gone un-noticed when TinyMCE was implemented because there almost no diactitics in English, the glossary activity is not widely used, or it so happens that not many words with diacritics in other languages have been entered as "concept" in the Glossary.
      This bug has just been mentioned on the French-speakingn forum at https://moodle.org/mod/forum/discuss.php?d=448623
      and I have provided the hack mentioned above (in a different place in the tinymce.js script at first). This must be considered a serious bug, since there are many words with diacritics in most European languages, and of course in the case of the Greek language it makes the Glossary completely non-functional when using TinyMCE.
      Obviously a better solution than my hack must be found.
      I have found quite a few posts on the Internet complaining about the fact that TinyMCE has 
      registerOption('entity_encoding',

      {         processor: 'string',         default: 'raw'       }

      );
      default set as 'named' rather than 'raw'
      Also, it must be investigated if setting raw instead of raw has unwanted consequences in other parts of using TinyMCE on a Moodle site.

            meirza.arson@moodle.com Meirza
            rezeau Joseph Rézeau
            Raquel Ortega Raquel Ortega
            Ilya Tregubov Ilya Tregubov
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            7 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours, 31 minutes
                4h 31m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.