We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 18367
    • 834 Posts
    I've got a getResources call inside a chunk inside a template and while it works ok, it is doing something strange in the document header.

    IE it adds a whole lot of tinymce js to the header.

    Anyone experienced this before and know what I've done wrong?

    This

    	<ul>	
    
    [[$popularPosts]]</ul>	


    calls this

    	<li class="first box1"><h3 class="make_them_click">Popular <em>Posts</em></h3></li>
    
    [[!getResourcesTag? &elementClass=`modSnippet` &element=`getResources` &tpl=`midbox` &parents=`3` &depth=`1` &limit=`6`  &includeContent=`1` &includeTVs=`1` and &processTVs=`1` ]]   	


    chunk Template

    <li class="first box1">
    <img src="[[+tv.boximage]]" width="250" height="" />
    <p><a href="[[~[[+id]]]]" title="[[+pagetitle]]">[[+pagetitle]]</a></p>
    </li>



    As I said it works ok, but I get something like this in the header. (I've edited it a lot as there's a whole page full of stuff in there.)

    <script type="text/javascript" src="/assets/components/tinymce/jscripts/tiny_mce/tiny_mce.js"></script>
    <script type="text/javascript" src="/assets/components/tinymce/xconfig.js"></script>
    <script type="text/javascript" src="/assets/components/tinymce/tiny.js"></script>
    <script type="text/javascript">
    //<![CDATA[
    2","setting_custom_buttons2_desc":"Enter the buttons to use as a comma separated list for the 
    //]]>
    </script>
    <script type="text/javascript" src="/assets/components/tinymce/tinymce.panel.js"></script>
    <script type="text/javascript">
    //<![CDATA[
    Tiny.config = {"accessibility_warnings":true,"browserUrl":"\/manager
    Tiny.config.setup = function(ed) {
        ed.onInit.add(Tiny.onLoad);
        ed.onKeyUp.add(Tiny.onChange);
        ed.onChange.add(Tiny.onChange);
    };
    Tiny.templates = [];
    
    Ext.onReady(function() {
    });
    //]]>
    </script>



    Thanks

      Content Creator and Copywriter
      • 36457 ☆ A M B ☆
      • 100 Posts
      Hi,
      I think this is because the processTVs option is set to 1. Can you try disable it then check again your header section?
        • 18367
        • 834 Posts
        ok that worked,set processTVs='0'

        but I thought it had to be set to '1' to make things work, or have I misinterpreted something.
          Content Creator and Copywriter
          • 36457 ☆ A M B ☆
          • 100 Posts
          I think it's a problem with the TinyMCE plugin hook. If you wanna process TVs, maybe specify the processTVList option will help you get rid of the RichTextTV (I think you're using one in your setup), and this should be where TinyMCE is trying to intergrating its functions to.
            • 18367
            • 834 Posts
            get rid of the RichTextTV (I think you're using one in your setup),

            Ah,, thanks.

            Maybe I'll just learn to live without RTE's altogether.
              Content Creator and Copywriter
              • 36457 ☆ A M B ☆
              • 100 Posts
              Quote from: markg at Apr 12, 2013, 05:01 AM
              get rid of the RichTextTV (I think you're using one in your setup),

              Ah,, thanks.

              Maybe I'll just learn to live without RTE's altogether.

              I don't think using RTE is a bad idea. Because it's made to be used, so the problem is tinyMCE hook imo. RTE indeed gives better user experience, especially who is not really familiar with HTML stuff. The main point is, I can not replicate this with getResources (yours is getResourcesTag) within my setup. So the getResourcesTag should also be taken into consideration.
              Can you test with getResources again? I really want to know which is generating the headers.
                • 10487 MODX Staff
                • 1,535 Posts
                So, how is the Richtext TV setup? Do you have the RTE enabled for the output as well as the input ... that would be what's injecting the TinyMCE code into your page.

                Note, the TinyMCE output option is actually broken as it currently stands. I put a PR in to rectify this here if anyone is interested smiley
                  Garry Nutting
                  Senior Developer
                  MODX, LLC

                  Email: [email protected]
                  Twitter: @garryn
                  Web: modx.com
                  • 18367
                  • 834 Posts
                  OK,

                  I'm not actually using RTE for the TV in question. The input is image and the output is text.

                    Content Creator and Copywriter