We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12555
    • 15 Posts
    So I’m going through the tutorial on creating a 3PC and I’m up to the part where I have a custom manager page and just used the first bit of Ext js to add the grid that is going to be populated with doodles. (http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution,+Part+II"" target="_blank" rel="nofollow">http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution,+Part+II)

    I can’t seem to get the connector to work though. Couple things I notice:

    - the tutorial states that I should see "{"success":false,"message":"Access denied.","total":0,"data":[],"object":[]}" when loading connector.php directly. Instead I see a blank page

    - If I add: echo "hit"; after the first two require_once lines in connector.php it displays on the page, but if I move the echo "hit"; line after "require_once MODX_CONNECTORS_PATH.’index.php’; then it no longer displays.

    - If I open up require_once MODX_CONNECTORS_PATH.’index.php’; and put a echo "hit"; line in that file it also displays, unless placed near the end after this:
    if (defined('MODX_REQP') && MODX_REQP === false) {
    } else if (!$modx->context->checkPolicy('load')) {
        @session_write_close();
        die();
    }
    

    which I assume is because I’m testing the file directly and not inside the modx context..

    Help please, I can’t figure out where I’m going wrong.
      • 19599
      • 33 Posts
      Sorry to not have a solution, but I want to confirm that I’m experiencing the same issue.

      I’m trying to follow this tutorial with release 2.0.8-pl
        • 12555
        • 15 Posts
        Can anyone confirm that this tutorial has proper instructions?
          • 19599
          • 33 Posts
          Hey Corbin,

          I have been going through this a little more and I could not get it to work. Also I could not get the completed project on github to work locally.
          When running the project at the point you describe (part II just before Adding Search) I get a Javascript syntax error referencing the ext-all.js file.

          I’m new to PHP and Sencha and thus have little experience debugging. I can only asume that there is a problem with either a return value or the syntax in one of the JS files part of the project that extends the sencha/modx framework.
            • 12555
            • 15 Posts
            Hmmmm...I followed the tutorial and checked and double checked everything, creating all the files myself and copy/pasting the text into them.

            I really enjoy working with modx so far and I would really love to begin building modx components. I think this should be a priority for modx because the easier it is for people to extend the core the more extensions will be made, making this great piece of software even better and more flexible.

            Can someone out there who has successfully created a modx 3rd party component from start to finish (including packaging for distribution through modx manager) please take a look at this?
              • 19599
              • 33 Posts
              I guess the only chance we have is:
              Download a working component with CMP’s and figure out why those are working as opposed to the sample.

                • 5340
                • 1,624 Posts
                Quote from: IAmCorbin at Mar 30, 2011, 10:49 PM

                Hmmmm...I followed the tutorial and checked and double checked everything, creating all the files myself and copy/pasting the text into them.

                I really enjoy working with modx so far and I would really love to begin building modx components. I think this should be a priority for modx because the easier it is for people to extend the core the more extensions will be made, making this great piece of software even better and more flexible.

                Can someone out there who has successfully created a modx 3rd party component from start to finish (including packaging for distribution through modx manager) please take a look at this?


                When I followed the Doddles tutorial I found that the code in the tutorial contained some hidden characters.
                https://github.com/splittingred/Doodles/issues#issue/1

                Try showing hidden characters in your editor and make sure the code doesn’t contain invalid characters
                  • 19599
                  • 33 Posts
                  I just got it to work.

                  Corbin, do you have other modx installs on your localhost by any chance?
                  If so, make sure you set the session_cookie_path and the session_cookie_name system settings as described in the first part of the tutorial:
                  http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution

                  That’s what caused the session invalidate for me and log me out after loading the component page.
                    • 12555
                    • 15 Posts
                    Alright, slight problem. I just created that new system setting and emptied the core/cache/ directory and upon logging out and attempting to log back in I am no longer able to log in...did I break something by deleting everything in core/cache? That seems to be what the instructions say.
                      • 19599
                      • 33 Posts
                      That is because your browser probably still has the old session cookie stored. So if you clear your cache and with that remove the cookies stored in your browser, you should be able to log back in.

                      And no, clearing the cache in modx does not do anything except clearing cached files. The system will rebuild the cache ones you start a new session