We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38359
    • 93 Posts
    Hi There,

    I'm trying to follow the Developing an Extra in MODX Revolution tutorial
    http://rtfm.modx.com/display/revolution20/Developing+an+Extra+in+MODX+Revolution

    I'm stuck at the bit that says:

    Making the Magic Path Settings

    We set a couple System Settings (that are specific to our development environment) that tell these lines where to get our files! Go ahead and make the following System Settings and set their values:

    doodles.core_path - /www/doodles/core/components/doodles/
    doodles.assets_url - /doodles/assets/components/doodles/

    How do I do this?

    I'm developing on WAMP server (not inside Modx).

    Thanks in advance!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      Go to System -> System Settings and create new settings.
        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
        • 38359
        • 93 Posts
        Hmm, Thanks sottwell. I think I'm getting confused here. The tutorial is outlining how to develop an Extra outside of Modx.
        So do I have to have an installation of Modx set up in the same root as the Extra I'm developing?
          • 38359
          • 93 Posts
          OK so I installed modx in my www folder so my directory structure looks like this:

          www
          ---doodles
          ------build
          ------assests
          ------core
          ---modx

          But when I try to run the build.schema.php file

          Now, you can go to your _build/build.schema.php file, and run it. I do it by loading up in a web browser: http://localhost/doodles/_build/build.schema.php.

          I get the error:

          Warning: include_once(/www/modx/core/model/modx/modx.class.php) [function.include-once]: failed to open stream: No such file or directory in C:\wamp\www\doodles\_build\build.schema.php on line 3

          I can't see what I've done wrong.

          Any help would be greatly appreciated.
            • 3749
            • 24,544 Posts
            So do I have to have an installation of MODX set up in the same root as the Extra I'm developing

            The include statement for MODX in your code is relative, so it's looking for MODX under the doodles directory.

            I think you kind of have it backwards, the doodles directory should be under the MODX directory. I'm guessing the doodles directory would go under:

            modx/core/components/

            but I haven't looked at the Doodles tutorial lately and I could be wrong.

            You might also look at the MyComponent Extra, which you can install in MODX using Package Manager. Once you edit the config file, it will handle the creation of the directories for you and put them in the right places. http://bobsguides.com/mycomponent-tutorial.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
              • 28042 ☆ A M B ☆
              • 24,524 Posts
              Doodles is done outside of the MODx installation, that's why the system settings for doodles.core_path and doodles.assets_url. I've worked through it a couple of times in a MAMP environment, with MODx and Doodles in separate subdirectories, i.e. htdocs/doodles/ and htdocs/revo/.

              In your Doodles folder, you have to have a core.config.php file with the proper path to your MODx core so that your Doodles can access MODx.
                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
                • 44195
                • 293 Posts
                Quote from: sottwell at Jan 18, 2013, 05:00 PM
                Doodles is done outside of the MODx installation, that's why the system settings for doodles.core_path and doodles.assets_url. I've worked through it a couple of times in a MAMP environment, with MODx and Doodles in separate subdirectories, i.e. htdocs/doodles/ and htdocs/revo/.

                In your Doodles folder, you have to have a core.config.php file with the proper path to your MODx core so that your Doodles can access MODx.


                Hi all,

                I know this post is from about a year ago but I'm having the exact same problem (I am on the windows version of XAMPP). The tutorial doesn't mention a core.config.php file, instead it uses build.config.php within the addon "_build" directory.

                I've gone through the code and I don't see anything obvious as to why it wouldn't work from a layman's perspective.

                The entire error message I'm getting when attempting to load "http://localhost/doodles/_build/build.schema.php" is:

                Warning: include_once(/www/modx/core/model/modx/modx.class.php): failed to open stream: No such file or directory in C:\xampp\htdocs\doodles\_build\build.schema.php on line 3
                
                Warning: include_once(): Failed opening '/www/modx/core/model/modx/modx.class.php' for inclusion (include_path='.;C:\xampp\php\PEAR') in C:\xampp\htdocs\doodles\_build\build.schema.php on line 3
                
                Fatal error: Class 'modX' not found in C:\xampp\htdocs\doodles\_build\build.schema.php on line 4


                If anyone has any insight as to why this doesn't work I'd be very appreciative! smiley

                Here's the link to the tutorial: http://rtfm.modx.com/revolution/2.x/case-studies-and-tutorials/developing-an-extra-in-modx-revolution

                Thanks in advance,
                Muzz
                  I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                  Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com
                  • 41592 ☆ A M B ☆
                  • 83 Posts
                  As you warning says: you've to fix your path to modx Class.
                  No such file or directory means that system can't find this file! Maybe your path is wrong
                    Francesco Mussoni | MODX Ambassador | Skype: solidusite2 | Email: [email protected]
                    • 3749
                    • 24,544 Posts
                    Running Setup should straighten out the paths for you. If not, check the MODX_CORE_PATH setting in the config.core.php file in the root (and the ones in the connectors/ and /manager folders.

                    Also, check the paths and URLs in the core/config/config.inc.php file.

                    Or, you could use this to do the checks for you: http://bobsguides.com/sitecheck-tutorial.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
                      • 44195
                      • 293 Posts
                      Quote from: BobRay at Oct 22, 2013, 04:18 PM
                      Running Setup should straighten out the paths for you. If not, check the MODX_CORE_PATH setting in the config.core.php file in the root (and the ones in the connectors/ and /manager folders.

                      Also, check the paths and URLs in the core/config/config.inc.php file.

                      Or, you could use this to do the checks for you: http://bobsguides.com/sitecheck-tutorial.html


                      Thanks very much guys.

                      I've checked all my paths. The files are in the correct places.
                      It is a fresh install of the latest modx in www/modx and the extra files are in www/doodles. I copied and pasted all the code from the tutorial just to make sure I hadn't made a typo.
                      The modx.class.php file is in the exact place the error msg says it is not.
                      I haven't gone through your site check tutorial yet but will do so now.

                      (BTW Bob, I bought your book. It's fantastic!)
                        I'm lead developer at Digital Penguin Creative Studio in Hong Kong. https://www.digitalpenguin.hk
                        Check out the MODX tutorial series on my blog at https://www.hkwebdeveloper.com