We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3749
    • 24,544 Posts
    I'm afraid I'm baffled. Your connectors URL looks fine.

    These errors seem to be the key:

    Uncaught SyntaxError: Unexpected end of input index.php?a=81&field=storeCV:22
    Uncaught TypeError: Cannot read property 'dom' of null ext-all.js:7


    but I don't know what they mean. Can you tell from the network tab in Chrome which index.php file is involved?
      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
      • 43957
      • 79 Posts
      If I run the Network tab in Chrome all files return 200 OK.

      The file in error is: http://www.mywebsite.com/manager/index.php?a=81&field=saveimage

      (saveimage is the name of the ImageTV and I've tried changing this recently)

      with Uncaught SyntaxError: Unexpected end of input
        • 3749
        • 24,544 Posts
        I've found the code that produces that URL (I didn't write it). PhpThumb is involved there, and it's always a good suspect, but I don't have much in the way of concrete suggestions.

        Take a look at System -> Actions and (on the left side), see if you can find the action with the ID of 81.

        Also, take a look at the npImageTpl chunk. It should have a div tag at the beginning and a closing div tag at the end.

        If you can do a view source on the NewsPublisher page, there should be a section of JavaScript that matches the one in the chunk (but with the tags replaced). See if any tags didn't get replaced with something or if any of the paths are wrong.

          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
          • 43957
          • 79 Posts
          Hi Bob,

          I've checked the Actions and 81 is Newspublisher - File Browser

          The npImageTpl has the opening and closing divs and seems to replace the tags correctly.

          <div id="np-[[+npx.fieldName]]-container" class="np-image">
                  [[+np.error_[[+npx.fieldName]]]]
                  <label class="fieldlabel" for="np-[[+npx.fieldName]]" title="[[+npx.help]]">[[+npx.caption]]: </label>
                  <input name="[[+npx.fieldName]]" class="image" id="np-[[+npx.fieldName]]" onchange="[[+npx.fieldName]]_preview(this.value)" type="text"  value="[[+np.[[+npx.fieldName]]]]" />
                  <button type="button" onclick="var popup=window.open('[[+npx.browserUrl]]', 'Select image...', 'width=' + Math.min(screen.availWidth,1000) + ',height=' + Math.min(screen.availHeight*0.9,700) + 'status=no,location=no,toolbar=no,menubar=no');popup.focus();browserPathInput=getElementById('np-[[+npx.fieldName]]');">[[%np_launch_image_browser]]</button>
                  <div id="[[+npx.fieldName]]_preview_container"></div>


          <div id="np-saveimage-container" class="np-image">
          <label class="fieldlabel" for="np-saveimage" title="">saveimage: </label>
                  <input name="saveimage" class="image" id="np-saveimage" onchange="saveimage_preview(this.value)" type="text"  value="" />
                  <button type="button" onclick="var popup=window.open('/manager/index.php?a=81&field=saveimage', 'Select image...', 'width=' + Math.min(screen.availWidth,1000) + ',height=' + Math.min(screen.availHeight*0.9,700) + 'status=no,location=no,toolbar=no,menubar=no');popup.focus();browserPathInput=getElementById('np-saveimage');">Select an image</button>
                  <div id="saveimage_preview_container"></div>
          


          What still baffles me is why the Resource Browser works when the accessing the site via the sub-folder url using my top level domain, but not when I point the actual site domain to that folder in my hosting, then access it via that URL.
            • 43957
            • 79 Posts
            Woah!!!

            I just made it work!!!

            I had Captcha turned on on the Manager Login page, so I turned that off and using your new code Bob and bingo the Resource Manager just loaded up. I've turned Captcha back on and it's still working.

            I have a feeling when I've moved the site to the folder and when I was testing on local host, I turned captcha off to ease setup, but then turned it on again. When I pointed the domain at the folder I didn't turn captcha off as I didn't need to, maybe just the act of toggling Captcha did something?

            I'll do some more testing to make sure that it's all working properly and report any more findings. smiley [ed. note: dave-b last edited this post 13 years, 2 months ago.]
              • 3749
              • 24,544 Posts
              I'm not sure we're out of the woods. I can imagine how turning Captcha off might help, but then turning it back on should break things again.

              Another thing I was going to suggest is checking the path and url on the filesystem Media Source, although I'm not really sure how they should be set. Mine are blank on localhost and the filebrowser works (though the image preview doesn't).

              Also, some people have had luck with changing the output type of the TV to text.
                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
                • 43957
                • 79 Posts
                Things seem to be working ok now with the code you provided and the image preview is working for me. I'm working on other ideas for the site at the moment, but I'll report back here if I run into further issues with TV's and Newspublisher or make any further discoveries. smiley

                Thanks very much for your help.
                  • 3749
                  • 24,544 Posts
                  I'm glad it's working for you. Thanks for the report. smiley
                    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