We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38371
    • 42 Posts
    Hello to everyone,

    I am currently building a cmp following the doodles tutorial.

    I was developing my application in modx. That is to say, I was putting my core files into /modx/core/components/myapp/ and the assets in /modx/assets/components/myapp/.

    Following this structure my cmp was working fine. However, I have decided to follow the tutorial's way of developing outside of modx.

    So, I have moved all my files in a directory at the root of my local server and created the magic settings.

    And here is where the problem began. The cmp widgets load but the grid comes up empty. Using FirePHP, I have narrowed down the problem to the following check performed in the /modx/connectors/index.php file:

    if (!$modx->context->checkPolicy('load'))


    The above line validates to true and then, the session ends.

    I have made some research about the "checkPolicy" method and, as far as I can tell, it returns false if the user in question does not have the permission to perform the action at hand.

    But, I log in as Administrator and this code used to work when it was located under the /modx/ directory.

    Can anyone explain to me why this happens?

    Thank you very much!

    This question has been answered by leffyrant. See the first response.

    • discuss.answer
      • 38371
      • 42 Posts
      My mistake!

      The problem is solved after following the notification at the start of the "Doodles Tutorial" regarding the session_cookie_path and session_cookie_name configuration.

      Only a minor issue. There is no session_cookie_name System Setting in MODx Revo 2.2.0 pl2. I have changed session_name, instead.

      Sorry for the spam:-)

        • 18373 ☆ A M B ☆
        • 3,141 Posts
        Thanks for catching the wrong system setting name, fixed it.

        If you come across other bugs in the docs, please report them at http://tracker.modx.com/projects/docs/ - that way we're sure they don't end up burried int he forums somewhere smiley
          Mark Hamstra • Developer spending his days working on Premium Extras and a MODX Site Dashboard with the ability to remotely upgrade MODX and extras to make the MODX world a little better.

          Tweet me @mark_hamstra, check my infrequent blog at markhamstra.com, my slightly more frequent ramblings at MODX.today or see code at Github.