We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 45374
    • 18 Posts
    Stuck again. This dragon won't die!

    I've carefully worked through this section twice. Part one of the tutorial works fine. The first part of the second part also works-- the CMP is live and I even get to see an empty grid. But I'm still not there.

    Rereading the tut and triple checking because I've skipped and/or botched things before:


    1. uncomment a line in home.class.php
    2. create /www/doodles/assets/components/doodles/js/mgr/widgets/doodles.grid.js
    3. uncomment stuff in home.panel.js
    4. create /www/doodles/assets/components/doodles/connector.php
    5. create /www/doodles/config.core.php

    6. make sure the modx core path is correct in that last file (mine seems to match other files that are already on my box)
    7. create /www/doodles/core/components/doodles/processors/mgr/doodle/getlist.class.php
    8. go look at your populated grid!

    I then end up with these error messages:

    51 messages are hidden by filters. Show all messages.
    body.scrollLeft is deprecated in strict mode. Please use 'documentElement.scrollLeft' if in strict mode and 'body.scrollLeft' only if in quirks mode. ext-all.js:21
    body.scrollTop is deprecated in strict mode. Please use 'documentElement.scrollTop' if in strict mode and 'body.scrollTop' only if in quirks mode. ext-all.js:21
    POST http://localhost/doodles/assets/components/doodles/connector.php 401 (Not Authorized) ext-base.js:21
    POST http://localhost/modx-2.2.10-pl/connectors/resource/index.php?action=getNodes&id=web_0&type=modContext 401 (Not Authorized) ext-base.js:21
    POST http://localhost/modx-2.2.10-pl/connectors/system/registry/register.php 401 (Not Authorized) ext-base.js:21

    The MODx gui then prompts me for a username and password; there are now rows populating on my grid. (It says, "Your session has expired. Please proceed to login again." But that isn't really true.)

    Clearly... something in the connector is failing to get the authorization it is expecting.

    Help...? [ed. note: coderjeff last edited this post 12 years, 10 months ago.]
      • 3749
      • 24,544 Posts
      Are you logged in to the Manager as the admin Super User when this happens?

      Is the URL accessing the connector in the same domain you logged in under?
        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
        • 45613
        • 45 Posts
        I am not sure but it might be a path problem?
        Notice how the first line is http://localhost/doodles/...
        But the others are http://localhost/modx-2.2.10-pl/...
        Do you have your doodles directory at the top of the site, or under modx-2.2.10-pl?
        You may need to fix a path somewhere to include modx-2.2.10-pl???

        Quote from: coderjeff at Dec 03, 2013, 02:51 PM

        POST http://localhost/doodles/assets/components/doodles/connector.php 401 (Not Authorized) ext-base.js:21
        POST http://localhost/modx-2.2.10-pl/connectors/resource/index.php?action=getNodes&id=web_0&type=modContext 401 (Not Authorized) ext-base.js:21
        POST http://localhost/modx-2.2.10-pl/connectors/system/registry/register.php 401 (Not Authorized) ext-base.js:21
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          If this is according to the tutorial, his Doodles is probably under localhost/doodles/, while the MODx site is under localhost/modx-2.2.10pl/

          Maybe a missed System Setting for the doodles namespace?
            Studying MODX in the desert - http://sottwell.com
            Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
            Join the Slack Community - http://modx.org
            • 45374
            • 18 Posts
            My modx installation is here: /var/www/html/modx-2.2.10-pl/

            My doodles folder is here: /var/www/html/doodles/

            The fact that it is outside of the modx environment is a key to the exercise, if I'm not mistaken.

            I am using the same log in that is editing namespaces and adding actions and so forth. I have seen my session expire before, but that is not what is happening here. I am logged in as super-duper-man when I am running this Doodles CMP.

            I see the grid.

            It is hitting up the connector.

            But the code is frying.

            (Thank you for responding-- I feel like I've already used up my allotment for this tutorial...!)
              • 45374
              • 18 Posts
              Quote from: BobRay at Dec 03, 2013, 09:17 PM
              Are you logged in to the Manager as the admin Super User when this happens?

              Is the URL accessing the connector in the same domain you logged in under?

              Clicking on my name in the upper right hand corner of the screen, my full name is listed on the form as "Default Admin User".

              Here is how the paths work out on my local machine:

              [root@localhost jeff]# cd /var/www/html/
              [root@localhost html]# cd doodles/assets/components/doodles/
              [root@localhost doodles]# ls -lrt
              total 12
              drwxr-xr-x 3 apache apache 4096 Dec  3 11:32 js
              drwxr-xr-x 2 apache apache 4096 Dec  3 14:18 css
              -rw-r--r-- 1 apache apache  654 Dec  3 14:29 connector.php
              [root@localhost doodles]# 
              


              There is a lot of stuff in that file. Not sure which bit is messing things up.
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                Well, if it makes you feel any better, I've worked through that tutorial three times, and every time it took me at least four tries to get that part to work. Now I cheat wink

                http://rtfm.modx.com/extras/revo/migxdb/migxdb.tutorials/migxdb.create-doodles-manager-with-help-of-migxdb
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 3749
                  • 24,544 Posts
                  Quote from: sottwell at Dec 04, 2013, 12:21 AM
                  If this is according to the tutorial, his Doodles is probably under localhost/doodles/, while the MODx site is under localhost/modx-2.2.10pl/

                  I think that would mean that the $_SESSION variables that verify your login and permissions status wouldn't be available to the connector since it's running in a separate domain.

                  Disabling the permission check in the connector might solve it.
                    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
                    • 28042 ☆ A M B ☆
                    • 24,524 Posts
                    It's always worked (eventually) when I go through it. It's actually run by the MODx core, just the files are included from the doodles directory.
                      Studying MODX in the desert - http://sottwell.com
                      Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                      Join the Slack Community - http://modx.org
                      • 45374
                      • 18 Posts
                      Quote from: sottwell at Dec 04, 2013, 12:21 AM
                      Maybe a missed System Setting for the doodles namespace?

                      I've had problems with these before, so I expect these are corrected by now.

                      doodles.assets_url = /doodles/assets/components/doodles/

                      doodles.core_path = /var/www/html/doodles/core/components/doodles/

                      Namespace and Area Lexicon Entry are set for these, too.

                      I don't think the other stuff would be working at all if these were wrong.