We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 3232
    • 380 Posts
    I have been following the tutorial while creating my own snippet/cmp and have had great success thus far. I am developing the package outside of modx root as suggested.

    My snippet outputs data, my CMP appears but the grid does not produce any data and I am constantly getting a "Your session has expired. Please proceed to login again."

    Monitoring everything in FireBug the connector.php (when trying to propagate a table) always produces a 401 error, access denied.

    {"success":false,"code":401}


    connector.php

    require_once dirname(dirname(dirname(dirname(__FILE__)))).'/config.core.php';
    require_once MODX_CORE_PATH.'config/'.MODX_CONFIG_KEY.'.inc.php';
    require_once MODX_CONNECTORS_PATH.'index.php';
    
    $corePath = $modx->getOption('videos.core_path',null,$modx->getOption('core_path').'components/videos/');
    require_once $corePath.'model/videos/videos.class.php';
    $modx->videos = new Videos($modx);
    
    $modx->lexicon->load('videos:default');
    
    /* handle request */
    $path = $modx->getOption('processorsPath',$modx->videos->config,$corePath.'processors/');
    $modx->request->handleRequest(array(
        'processors_path' => $path,
        'location' => '',
    ));


    Does anyone know what could be causing this error? I did go into system settings and set the cookie path to be / as mentioned in part I of the tutorial. [ed. note: betoranaldi last edited this post 14 years, 2 months ago.]
      • 3232
      • 380 Posts
      I really can't win lately... I was having some crazy browser issues so I went ahead and cleared my local cache. Low and behold... data started to propagate.

      -Brian
        • 42936
        • 30 Posts
        Brian, did you solve the "Your session has expired. Please proceed to login again." problem? I've got it too.

        Martin
          • 3232
          • 380 Posts
          Quote from: mpxedwards at Sep 13, 2012, 02:18 PM
          Brian, did you solve the "Your session has expired. Please proceed to login again." problem? I've got it too.

          Martin

          Yes, I did. The issue was with a setting.

          In System Settings > Sessions and Cookies you want to change the session cookie path to be the root of the domain / rather than the default modx base url.
            • 42936
            • 30 Posts
            Thanks, do you mean just put a forward slash in the value? I did that and couldn't log in? Or do I put localhost/sitename/ ?
              • 3232
              • 380 Posts
              yup forward slash

              Just to give you a background of my setup.

              Modx is installed at: domain.com/modx
              Custom manager page is at: domain.com/cmp

              Originally the cookie session was set at /modx/ which prevented anything from outside of that directory access so the cmp could not access what it needed. I went into setting and changed the cookie path to encompass both directories by setting it to "/"
                • 37667
                • 18 Posts
                Hi, I've followed the CMP Doodles tutorial and am stuck in Part 2. I am able to get the grid loaded, but inside the grid says "Access denied". I've created the getlist.class.php file located here: /Applications/MAMP/htdocs/doodles/core/components/doodles/processors/mgr/doodle/getlist.class.php

                The connector.php console shows this response:
                {"success":false,"message":"Access denied.","total":0,"data":[],"object":{"code":401}}

                I've gone through the tutorial several times, but am not able to figure out why it's not showing any data from the custom table.

                I've also tried changing the session_cookie_path to a slash, but that doesn't allow me to log into the manager page at all.

                I've also tried clearing cache, but still no luck.

                I am running Revo 2.2.7 on MAMP.

                Any advice or tidbit on where to look is much appreciated.
                  • 42936
                  • 30 Posts
                  tahoeg, no I never did find a solution and gave up altogether.
                    • 4172
                    • 5,888 Posts
                    if you are looking for an easier way to create a doodles-like CMP try this:
                    http://rtfm.modx.com/display/ADDON/MIGXdb.Create+doodles+manager+with+help+of+MIGXdb
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 18373 ☆ A M B ☆
                      • 3,141 Posts
                      Changing the session_cookie_path is typically the solution to that access denied error. May need to flush all permissions and clear your browser cookies for the website in order for it to properly stick, tho.
                        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.