We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 2611
    • 394 Posts
    We have noticed that when we use TinyMCE (newest release as of today with MODx 2.0.2) in the
    "Template Variable" tab for a resource it throws an error when trying to save it.

    Steps to reproduce:
    - Create some TV’s that use TinyMCE and assign to a template
    - Open a resource
    - Change the template to empty
    - Change the template to the one having the TinyMCE TV’s
    - Try to save your resource

    It shows the "Saving" dialog from Ext but hangs because of an error.

    After some research i found that it has to do with the fact that these editors
    are hidden and the instances are not removed properly.

    This specific code: (/assets/components/tinymce/tiny.js)
    MODx.unloadTVRTE = function() {
        Tiny.onTVUnload();
    };


    Does not get called at all (try by putting an alert in there)

    You can get around this by NOT using TinyMCE in TV’s temporarely.

    Does anyone have a fix for this ?
      Follow me on twitter: @b03tz
      Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
      CodeMaster
      • 28215
      • 4,149 Posts
      splittingred Reply #2, 16 years ago
      This has been fixed in both Revo 2.0.3 (in Git) here: http://github.com/modxcms/revolution/commit/b64eb01b73ad203d910c5145edfe2dc308a9f3b6

      And in the latest TinyMCE, 4.0.5-pl.

      Thanks for catching it.
        shaun mccormick | bigcommerce mgr of software engineering, former modx co-architect | github | splittingred.com
        • 2611
        • 394 Posts
        That is GREAT news. Thanks! grin
          Follow me on twitter: @b03tz
          Follow SCHERP Ontwikkeling on twitter: @scherpontwikkel
          CodeMaster