We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 577
    • 132 Posts
    Quote from: BobRay at Feb 20, 2013, 10:47 PM
    [Update] I looked at the code and I think it will work to just put the packages in the _build/data/subpackages directory (if MC doesn't do it for you).

    They should be transferred with the package and placed in the core/packages directory, where you can find them with "Search Locally for Packages" in Package Manager.


    This does not seem to be working for me. Is there any other setup beyond just creating a subpackages folder under _build/data? I have given this a try and not working.

    The image illustrates my file location and my goal is to get "login package" to be included in the build.
      "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
      • 3749
      • 24,544 Posts
      Did you "Search Locally for Packages" in Package Manager after installing the extra?

      [Update] Oops, I see the problem.

      Try putting them in assets/mycomponents/yourcomponent/core/components/yourcomponent/packages/

      And put a file (any file) in _build/data/subpackages so it won't be empty.

      Let me know if it works.
      [ed. note: BobRay last edited this post 13 years, 5 months ago.]
        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
        • 577
        • 132 Posts
        Thanks BobRay that got the package to get added to the build and carried along for the ride. It also find a home on install at its same location under component but never makes it into subpackages _build folder of into the actual packages folder to be installed from local.

        There was some previous comments in this thread to a array hash key/value of "'hasSubPackages' => true," . This is not in my config. Should I add that?

        Thanks again for all your support.
          "One of these days I will get around to my own website... Its only been about 12 years... maybe tomorrow smiley"
          • 3749
          • 24,544 Posts
          Sorry, I haven't had time to test anything. I think this might actually be the correct fix:


          Put the packages in

          assets/mycomponents/yourcomponent/_build/data/packages/ (you'll have to create the packages directory)

          Change this line in the sources array in build.transport.php

          'packages' => $root . 'core/packages',


          to this:

          'packages' => $root . '_build/data/packages',


          Change this line:

          $hasSubPackages = is_dir($sources['data'] . 'subpackages');


          to this:

          $hasSubPackages = is_dir($sources['data'] . 'packages');


          After doing this, you no longer need the subpackages directory and you don't need to put the package files anywhere else.

          Let me know if it works. wink
            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