We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 42562
    • 1,145 Posts
    What is your valid_elements looking like?
      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.
      • 24374
      • 322 Posts
      Quote from: donshakespeare at Sep 06, 2017, 08:35 PM
      What is your valid_elements looking like?
      I don't have valid_elements entered in the setups at all, so it must be whatever the default is. This is true on both the working and non-working sites.
        • 42562
        • 1,145 Posts
        I need you to paste the very exact list of plugins you have on the working sites.
        COPY exactly, without mistake, the exact thing and let me see. I have a hunch about something very sneaky going on.

        You already pasted here what you have on the problematic site ...
          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.
          • 42562
          • 1,145 Posts
          RE: rainbowtiger

          The code below works perfectly.
          Paste it and test here:
          http://fiddle.tinymce.com/

          Since I can't see all of the constituents of your issue, my hazard guesses are in comment form
          tinymce.init({
          selector: "textarea", // for fiddle only
          plugins: "autoresize,preview,paste,contextmenu,image,fullscreen,code,charmap,searchreplace,textpattern,importcss,table,anchor,nonbreaking,lists,media,hr,template",
          content_css: "css/style.css", // must exist/be accurate/contain said classes/ and, preferably local CSS file
          importcss_groups: [
          {title: 'Table styles', filter: /^(td|tr|th|table)\./},
          {title: 'Block styles', filter: /^(div|p|h2|h3|h4|h5)\./},
          {title: 'Bullet styles', filter: /^(ul|ol|li)\./},
          {title: 'Link styles', filter: /^(a)\./},
          {title: 'Image styles', filter: /^(img|figure)\./},
          {title: 'Inline styles'}
          ],
          importcss_append:true,
          });


          Make sure nothing in your commonCode chunk is overwriting this code.

          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.
            • 24374
            • 322 Posts
            Quote from: donshakespeare at Sep 07, 2017, 06:51 AM
            I need you to paste the very exact list of plugins you have on the working sites.
            COPY exactly, without mistake, the exact thing and let me see. I have a hunch about something very sneaky going on.

            You already pasted here what you have on the problematic site ...
            Both sites have exactly the same code. The linked CSS file is fine.

            Common Code:
            skin_url: MODx.config.assets_url+'components/tinymcelocal/skins/lightgray',
            link_list:[ 
              [[-$TinymceWrapperLinkList]] 
            ],
            relative_urls: false,
            remove_script_host: true,
            content_css : "/css/styles.user2.css?v=13",
            elementpath: true,
            modxMagicHoverLinkSettings: {
              stripMODXurl: false,
            },
            allow_script_urls: true,
            convert_urls: false,
            document_base_url: MODx.config.site_url,
            rel_list: [
              {title: 'None', value: ''},
              {title: 'FancyBox', value: 'fancybox'}
            ],
            link_class_list: [
              {title: 'None', value: ''},
              {title: 'FancyBox', value: 'fancybox'}
            ],
            image_class_list: [
              {title: 'None', value: ''},
              {title: 'photoright', value: 'photoright'},
              {title: 'photoleft', value: 'photoleft'}
            ],
            table_class_list: [
              {title: 'None', value: ''},
              {title: 'table-list', value: 'table-list'},
              {title: 'table-outlined', value: 'table-outlined'},
              {title: 'table-fees', value: 'table-fees'},
              {title: 'formtable', value: 'formtable'}
            ],
            style_formats: [
              {title: 'Heads', items: [
                {title: 'Head 2', block: 'h2'},
                {title: 'Head 3', block: 'h3'},
                {title: 'Head 4', block: 'h4'},
                {title: 'Head 5', block: 'h5'}
              ]},
              {title: 'Blocks', items: [
                {title: 'paragraph', block: 'p'},
                {title: 'division', block: 'div'}
              ]},
            ],
            element_format : 'html',
            cleanup : true,
            formats: {
              alignleft: {selector: 'img,table', collapsed: false, classes: 'align-left'},
              alignright: [ {selector: 'img,table', collapsed: false, classes: 'align-right'},
                {selector: 'figure', collapsed: false, classes: 'align-right', ceFalseOverride: true},
                ]
            },
            image_caption: true,
            browser_spellcheck: true,
            gecko_spellcheck: true,
            paste_data_images: false,
            menubar: false,
            statusbar: true,
            image_advtab: true,
            setup: function(editor) {
              editor.on('keydown', function(evt) { 
                if (evt.keyCode == 83 && evt.ctrlKey && !evt.shiftKey && !evt.altKey && !evt.metaKey) {//ctrl + s = save 
                  evt.preventDefault();
                  $('#modx-abtn-save button').trigger("click");
                }
                if (evt.keyCode == 27) { //escape key = remove fullscreen 
                  evt.preventDefault();
                  if ($('.mce-fullscreen').length) {
                    tinymce.activeEditor.execCommand("mceFullscreen")
                  }
                }
              });
              editor.on("init",function() { //float fullscreen link
              containerId = $(editor.getContainer()).attr("id");
               $("#"+containerId+" .mce-i-fullscreen").parent().parent().parent().parent().css("float","right");
              });
            },
            external_plugins:{
              twAceEditor: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twAceEditor.js",
              // twCodeMirror: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twCodeMirror.js",
              // bubbleBar: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/tinymceBubbleBar.js",
              // twExoticMarkdownEditor: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/twExoticMarkdownEditor.js",
              modxMagicHoverLink: "[[++assets_url]]components/tinymcewrapper/tinymceplugins/modxMagicHoverLink.js",
              jsplus_image_editor: "[[++assets_url]]components/tinymcelocal/plugins/jsplus_image_editor/plugin.min.js",
            },
            file_browser_callback : autoFileBrowser,
                cssFiles: [
                 '/assets/components/tinymcewrapper/tinymceplugins/codemirror/neat.css'
                ],
            //leave trailing comma

            Content:
            tinymce.init({
              selector: "#ta",
              [[+commonTinyMCECode]]
              statusbar: true,
              fontsize_formats: '10px 11px 12px 13px 14px 16px 18px 20px 22px 24px 28px 32px',
              plugins: "autoresize,preview,paste,contextmenu,image,fullscreen,code,charmap,searchreplace,textpattern,importcss,table,anchor,nonbreaking,lists,media,hr,template",
              importcss_groups: [
                {title: 'Table styles', filter: /^(td|tr|th|table)\./}, // td.class and tr.class
                {title: 'Block styles', filter: /^(div|p|h2|h3|h4|h5)\./}, // div.class and p.class
                {title: 'Bullet styles', filter: /^(ul|ol|li)\./}, // 
                {title: 'Link styles', filter: /^(a)\./}, // 
                {title: 'Image styles', filter: /^(img|figure)\./}, // 
                {title: 'Inline styles'} // The rest
              ],
              templates: [
                {title: 'Two Columns', description: 'Mobile-friendly two-column setup', content: '<div class="row"><div class="col6"><p>text</p></div><div class="col6"><p>text</p></div></div>'},
                {title: 'Three Columns', description: 'Mobile-friendly three-column setup', content: '<div class="row"><div class="col4"><p>text</p></div><div class="col4"><p>text</p></div><div class="col4"><p>text</p></div></div>'}
              ],
              importcss_append: true,
              resize: true,
              autoresize_min_height: 100,
              autoresize_max_height: 600,
              toolbar1: "fullscreen | code | undo redo |  blockquote | nonbreaking hr charmap | bold italic superscript subscript alignleft aligncenter alignright |  bubbleBarOptionsButton",
              toolbar2: "bullist numlist indent outdent | link unlink anchor | image media jsplus_image_editor | table | searchreplace | removeformat | template | styleselect",
              contextmenu: "table | removeformat | link | image"
            });
            

              • 42562
              • 1,145 Posts
              Works for me!
              At this rate, clear your browser cache.
              Test with another browser.
                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.
                • 24374
                • 322 Posts
                Quote from: donshakespeare at Sep 08, 2017, 05:51 AM
                Works for me!
                At this rate, clear your browser cache.
                Test with another browser.
                Wow, more weirdness. So, if I log in at the secure address (https://website.com), I DO see the extended groups under Format, BUT only for the first two contexts (English and Spanish). When I edit any of the other contexts (starting with "PACE"), I get nothing at all, just a big blank white space where the content should be. But this works ONLY if I don't put "www." in front of the domain name; if I do, then I get the same situation as the following: If I log in at the non-secure address (http://website.com/manager) or the secure address with "www." (https://www.website.com/manager), then I DO NOT see the extended groups under Formats, but I can edit all the contexts just fine. What on earth is going on??? [ed. note: rainbowtiger last edited this post 6 years, 7 months ago.]
                  • 42562
                  • 1,145 Posts
                  Yup, working perfectly for me.
                  All the expected groups and all.

                  I would paste an image here, but this forum software is on its last leg.
                    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.
                    • 3749
                    • 24,544 Posts
                    That's what might happen if you didn't uncomment the part of .htaccess that forces www or non-www URLs (one section, but not both). When you switch from one URL to another during a session, the session is lost, so permissions get futzed.

                    If it's already uncommented, maybe your routing system is bypassing that part of .htaccess.
                      Did I help you? Buy me a beer
                      Get my Book: MODX:The Official Guide
                      MODX info for everyone: http://bobsguides.com/modx.html
                      My MODX Extras
                      Bob's Guides is now hosted at A2 MODX Hosting
                      • 24374
                      • 322 Posts
                      Quote from: BobRay at Sep 08, 2017, 10:13 PM
                      That's what might happen if you didn't uncomment the part of .htaccess that forces www or non-www URLs (one section, but not both). When you switch from one URL to another during a session, the session is lost, so permissions get futzed.

                      If it's already uncommented, maybe your routing system is bypassing that part of .htaccess.
                      But the routing system only affects the front end, not the manager, right?

                      And, I tried clearing all session cookies and clearing disk cache, logging out, then logging in again at a different URL, and the result is the same.