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
    The problem is that MODX Resource Content Field has no proper(ty) unique media source.

    But, with the upcoming release, and the use of elFinder, this will be a breeze.
    A split will occur within same media source

    Media Source
     ----->documents
     ----->images
    

    And a little thingy (type) already present within the insert popup will trigger the distinction on the fly.
    At this rate, it might be very possible with the MODX native browser as well.

    But, we'll have to wait
      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.
      • 40088
      • 708 Posts
      Revo 2.6
      TW 2.3.2
      Prism js (syntax highlighting)

      I'm seeing an issue when inserting code on the front-end (TMP) using TinyMCE and the twPreCodeManager plugin. When editing via the Manager everything works perfectly. Plus this only seems to happen when inserting HTML code with opening/closing
      < >
      . Inserting CSS, js etc. seems to be ok.

      For example, inserting this code
      <p data-pullquote="“This is a pull quote.”">Paragraph text.</p>
      into twPreCodeManager and selecting the Prism Library option results in the opening/closing tags being stripped leaving only the plain text in-between which in this example is, “Paragraph text”.

      Ideas?
        Todd
        • 42562
        • 1,145 Posts
        Purely unexpected behaviour!

        Works in the back, not in the front ... hmm!

        Something is reverting that entity back to the angle brackets and I guess some order sanitizer is at work.

        At what point does this stripping occur? after you save/refresh?
        Or as you hit okay from the twPreCodeManager dialogue box?

        Any JS browser errors in the frontend?
          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.
          • 40088
          • 708 Posts
          It happens on Save/Refresh.

          I don't understand this error:
          <script type="text/javascript">
          /********** TinyMCE init code **************/
            tinymce.init({  ! Can't find variable: tinymce
          ...
          });
          
            Todd
            • 40088
            • 708 Posts
            Looking at the source code there are 2 instances of empty pre and code tags, one before the example code,
            <p data-pullquote="“This is a pull quote.”">Paragraph text.</p>

            and the other after it, and is the result of save/refresh.

            Here's the whole thing:

            <pre class="language-markup line-numbers" contenteditable="false"><code class="language-markup"></code></pre>
            <p data-pullquote="“This is a pull quote.”">Paragraph text.</p>
            <pre class="language-markup line-numbers" contenteditable="false"><code class="language-markup"></code></pre>
              Todd
              • 24374
              • 322 Posts
              I'm getting my logs filled up with error messages like this:

              [2017-11-30 11:30:06] (ERROR in modContext::makeUrl @ /home/ebnhc/careers/core/model/modx/modcontext.class.php : 321) Resource with id 7 was not found in context mgr
              (MODX 2.5.5)

              or this:

              [2017-11-30 12:37:42] (WARN @ /home/ecosmith/test/core/model/modx/modcontext.class.php : 244) `3` was requested but no alias was located.
              (MODX 2.6.0)


              I get it on different websites, no matter what the MODX version (anywhere from 2.5.5 to 2.6.0). It always shows the ID number of the "tw_elfinder_browser" resource created on installing TinyMceWrapper. That resource is unpublished when installed. I tried publishing it, with no change in the error messages. What could be causing this?
                • 3749
                • 24,544 Posts
                I'm guessing here, but if you're previewing from the Manager, the context will be 'mgr' unless you explicitly log in with Login in the front end or visit from another browser where you're not logged in to the Manager. So it's looking for the resource in the 'mgr' context, which probably isn't the context of the resource.
                  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 Nov 30, 2017, 11:07 PM
                  I'm guessing here, but if you're previewing from the Manager, the context will be 'mgr' unless you explicitly log in with Login in the front end or visit from another browser where you're not logged in to the Manager. So it's looking for the resource in the 'mgr' context, which probably isn't the context of the resource.

                  Not sure what you mean. This resource belongs to TinyMceWrapper, which is only in operation when logged into the Manager. The error doesn't get generated when previewing anything on the front end. It gets generated when viewing ANY page in the manager — viewing error log, editing system preferences, anything — not just when editing a resource.
                    • 3749
                    • 24,544 Posts
                    OK, but what is the context_key of the resource set to? I doubt if it's 'mgr' and that's the context that's trying to find the resource.

                      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 Dec 01, 2017, 02:23 AM
                      OK, but what is the context_key of the resource set to? I doubt if it's 'mgr' and that's the context that's trying to find the resource.

                      It's "web", same as all other resources.