We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 36734
    • 14 Posts
    Quote from: eprochasson at Dec 07, 2012, 03:35 AM
    Hi guys,

    thanks so much for that quick fix. In my case, it was working fine most of the time with Chrome (still had that problem where it randomly did not save the tinyMCE content), but was completely failing with some versions of Firefox. The quick fix made everything works fine, and definitely saved me days of investigation to fix it.

    Is there a pull request for that ?
    (and sorry michelle, hijacking your topic as well).

    Yeah, I spoke too fast. It doesn't really solve the problem with Firefox (it now crashes on the tinyMCE.triggerSave() call). I'll investigate further.
      • 36734
      • 14 Posts
      Alright, after few hours of investigating, I could not find a solution but came to a few conclusion:
      - without any changes, it crashes* every single time with my Firefox (or with such a high probability that I never encountered the case when it works).
      - the textarea is initialized twice. Once on "load", once on "onShow", that adds a few editors to the tinyMCE.editors array. Fixing that seems to lower the probability of failure (but I couldn't find a clean way to do this, ie: one that will work for everyone).
      - removing the tinyMCE editors on "submit" GREATLY improve the probability of success. But not always, it still crashes randomly. I used a code similar from the one in "switchForm", and
      tinyMCE.execCommand('mceRemoveControl', false, ed.id); 

      - Adding a setTimeout to initialize the editor seems to help a bit.
      - Adding a setTimeout to make sure the editor has been cleared before hiding the window seems to help as well.

      At the end, it still randomly crashes, and I failed at finding why.

      For the record, I use Firefox 16.0.2, packaged for Ubuntu. A colleague uses Firefox 17.0.1 for Windows and has a higher success rate, but it eventually fail after a few attempts. Somehow, I wonder if time is not litteraly of the essence: he's computer is a slow piece of hardware, the manager takes few seconds to render, maybe leaving enough time for tinyMCE to properly initialize/cleanup.

      And it works great with Chrome, but unfortunately the rest of the manager is often randomly broken (due to aggressive caching from Chrome), so it's not really a great help.

      * By crashing, I mean that at some point, tinyMCE throws the following error:
      NS_ERROR_UNEXPECTED: Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED) [nsIDOMHTMLDocument.implementation]
      • I have never had the issue of the content not saving, but has ANYONE found a solution for the header disappearing when clicking on a formtab with a richtext TV?
          Ben Morrison
          Hacking templates to pieces since 2003
        • I can confirm the top nav issue. (Using Chrome)
          I have the rich content on a second tab in a migx form.
          When the second tab is clicked the modx top navigation disappears.
          https://github.com/Bruno17/MIGX/issues/59