We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 49312
    • 61 Posts
    [[ SEE UPDATE BELOW ]]

    I've been testing and searching for a while and I'm just not coming up with an answer.

    In order to limit to clients to a specific directory I have create a new media source and then changed the default media source in system settings to my new media source.

    All pages seem to work and save correctly except for my homepage. In the homepage resource I have a few TVs. One has a tinyMCE editor and this seems to be where the issue lies. When I set my default media source to my new media source and go to my TV the content is removed from within tinyMCE and seems to be locked, I can't add new content or do anything. If I try to save the homepage is just gets stuck on the saving modal box.

    If I go back to the original default media source the content is back in tiny MCE and the page saves fine.

    I have another TV on the page that has an image upload and it seems to work fine, I can see the thumbnails and add new images without issue. (just can't save).

    I have tried editing the media source on the TV itself to match my new media source but that does not have any affect. Other image upload TVs used throughout pages on the site still have the original media source set in the TV settings and I don't have any issues with those pages, it seems isolated to the tinyMCE (richtext) TV type.


    tinyMCE works just fine for the main content of the homepage (and all other pages) just not inside my TV.

    MODX Revolution 2.5.2-pl

    Thank you for your time!

    UPDATE

    I updated the title on this topic to better reflect the current situation.

    I originally thought the issues was tied to a media source, but it does not seem to have anything to do with it. Basically TinyMCE works fine on the normal content section of the site, but if I create a richText TV tiny MCE is not working and is keeping the page from saving. Pages without the TV edit and save fine. [ed. note: formulax last edited this post 9 years, 10 months ago.]
      • 42562
      • 1,145 Posts
      Please see this https://forums.modx.com/thread/75275/character-can-t-be-saved-in-tinymce

      Try removing the content on said problematic TV to test the issue further.

      P.S
      Which of the many TinyMCE Extras are you using in your MODX?
        TinymceWrapper: Complete back/frontend content solution.
        Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
        5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
        • 49312
        • 61 Posts
        Well I swear earlier changing the default media source back to the standard media sources made tinyMCE work again within the TV, but now it seems to be broke both ways.

        I've deleted my TV and added a new one (only way I could clear out the data since I could not save). New TV with tinyMCE has same result. What is odd is as I said before tinyMCE works just fine everywhere else on the site.

        As far as I know it is just the standard tinyMCE install.
          • 49312
          • 61 Posts
          I added the TV to other templates and it is the same result, so the issue is not limited to just the homepage.
            • 42562
            • 1,145 Posts
            Look here https://modx.com/extras/browse/?search=tinymce
            There are at least three TinyMCE Extras.

            Look in your browser's inspector for any errors reported by MODX; any?

            Disable RTE for said page, does the issue persist?
              TinymceWrapper: Complete back/frontend content solution.
              Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
              5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
              • 49312
              • 61 Posts
              I have the first one in the list:
              TinyMCE 4.3.4-pl | Author: theboxer

              If I change the TV to a textarea the page saves just fine. Adding it back to RichText breaks it.

              I appreciate the support Don!
                • 49312
                • 61 Posts
                Quote from: donshakespeare at Nov 29, 2016, 01:52 AM

                Look in your browser's inspector for any errors reported by MODX; any?

                I've attached a screenshot of the console log. The NS_ERROR_UNEXPECTED: errors happen when I try to click on a button on TinyMCE from within the TV.

                Thanks,
                Steve
                  • 42562
                  • 1,145 Posts
                  RE:formulax

                  Possibly Related Issue
                  Error: NS_ERROR_UNEXPECTED #794
                  https://github.com/tinymce/tinymce/issues/794

                  Possible Easy Solution (if you are up to it)
                  http://howtofoobar.blogspot.com/2015/01/how-to-solve-nserrorunexpected-tinymce.html
                  If you are using tinyMCE on your website, and you found NS_ERROR_UNEXPECTED (if you are using firebug, it shown at console) when you try to submit a form that contain tinyMCE or you can submit a form but the content of tinyMCE won't be posted, don't worry I will share how to solve this error.
                  This error happen because tinyMCE input box is not textarea but a div and it will not post when you submit a form where textarea placed. What you need to do are add theses following code on submit event,
                  tinyMCE.triggerSave();
                  So the complete code be like this,
                  $("#btnSave").click(function() {
                        tinyMCE.triggerSave();
                       $("#frmPost").submit();
                       return false;
                  })
                  That command is used to load tinyMCE input to a hidden textarea and of course this will be posted when you submit a form that contain tinyMCE.

                  Summary (with some assumptions)

                  1. Issue exists only in Firefox (may be)
                  2. Issue is replicable with outdated versions of TinyMCE core (yes)
                  3. Issue here is caused, in part, by the said MODX Extra's manner of loading and saving the Resource TV since main content works fine. (definitely)
                  4. Issue has been fixed (in the official tinymce.com TinyMCE) since August (hmm... looks like it!)

                  Solutions

                  1. Use my MODX Extra, TinymceWrapper
                    https://modx.com/extras/package/tinymcewrapper
                    https://forums.modx.com/thread/97694/support-comments-for-tinymcewrapper
                  2. Done! ... smiley ... Thank me later



                  Cheers
                    TinymceWrapper: Complete back/frontend content solution.
                    Harden your MODX site by passwording your three main folders: core, manager, connectors and renaming your assets (thank me later!)
                    5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.