We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 39742
    • 29 Posts
    Hello.
    I'm trying to create an extra following the doodles example.
    I'm having trouble in the CMP because the request to the connector.php seams to be denied.
    I get this message in chrome:
    Not allowed to load local resource: file:///C:/xampp/htdocs/myextra/assets/components/myextra/connector.php
    The path is correct and the file is there.
    Can someone help me find the problem?
    Thanks
      • 3749
      • 24,544 Posts
      It might be a permissions problem with the folder containing connector.php.

      Or it could be a mod_security issue: http://wiki.modxcms.com/index.php/What_is_mod_security_and_how_does_it_affect_me



      ------------------------------------------------------------------------------------------
      PLEASE, PLEASE specify the version of MODX you are using.
      MODX info for everyone: http://bobsguides.com/modx.html
        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
        • 39742
        • 29 Posts
        Hello Bob. Thanks for answering.
        I confess that I don't have great knowledge about the more hardcore stuff in web development...namely apache permissions.
        I did insert "SecFilterEngine Off" in .htaccess after reading your reference but the problem persists (also restarted apache)
        I did however managed to identify exactly where the error is generated.
        I changed the sencha "ext-base.js" and "ext-all.js" for the unminified versions
        It's in javascript in the line 1979 of "ext_base.js" in the "asyncRequest" function.
        The call to XMLHttpRequest.send fails.
        The "open" method (line 1964) runs ok but the "send" method fails.
        The postData is "start=0&limit=20&action=mgr%2Fralpi%2FgetList&HTTP_MODAUTH=modx4f9810159a54c9.50690830_14fb8dcff464bf3.61994919"

        The error in chrome console is:
        "Not allowed to load local resource: file:///C:/xampp/htdocs/modx_ralpi/assets/components/ralpi/connector.php"

        The file is accessible and I can open it in chrome

        I have no clue about this one...Can you help me?



          • 3749
          • 24,544 Posts
          I don't have any ideas other than turning off the compress_js system setting.
            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
            • 39742
            • 29 Posts
            Hello again.
            ok...again I missed something really basic...sorry

            The XMLHttpRequest url can't have a full disk path.
            The core_path must be a full file path like "C:/xampp/htdocs/modx_ralpi/core/components/doodles/" but the assets_url must only be "/modx_ralpi/assets/components/doodles/"

            I had problem with the paths earlier and ended up using full path but only core_path variable should use it.

            Thanks again.




              • 3749
              • 24,544 Posts
              It's easy to confuse paths and URLs, since the URLs are very path-like. wink

              I still do it occasionally.


              ------------------------------------------------------------------------------------------
              PLEASE, PLEASE specify the version of MODX you are using.
              MODX info for everyone: http://bobsguides.com/modx.html
                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
                • 39742
                • 29 Posts
                I have it working now but had to solve another thing that was missing in the doodles tutorial.
                A problem regarding authorization and siteid.
                Just for the record here's a link to the post where I found the solution.
                https://forums.modx.com/thread/?thread=65293.&i=1&page=1
                It seams doodles tutorial isn't up to date.
                Thanks again.
                  • 39742
                  • 29 Posts
                  Just for the record...
                  The previous "fix" I mentioned (and I didn't really understand) doesn't seams to be necessary.
                  The problem with permissions had to do with something I missed in the extras tutorial...this:

                  You may have to add a System Setting in your MODX install called session_cookie_path and give it a value of "/" (no quotations). This will tell MODX to use the same session when you're running stuff at http://localhost/doodles/. Also, giving it a unique name via session_name (like "modxlocaldevsession") is a good idea too. That'll prevent conflicts with other MODX installs on your local machine. If you do this, empty the core/cache/ directory and relogin after doing so.

                  Now it works without the "fix" from the previous post.
                  Seems nicer now smiley