We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 34120
    • 236 Posts
    I'm using mycomponent to package up a fairly simple component.

    *edit this first issue has magically resolved
    My first issue is I've created a system setting but once this is installed via my package I'm unable to update the value through the manager.

    Secondly how do I include sub-packages? I believe this is only partially supported at the moment. The packages will appear in the manager after searching locally, they then need to be installed manually. I can't figure out how to do this.

    I've tried various things in component.config.php eg.
    'hasSubPackages' => true,

    But no joy

    Any ideas? thanks!


    [ed. note: bobwal last edited this post 13 years, 7 months ago.]
      • 3749
      • 24,544 Posts
      Sorry, bobwal, that feature was there, but got lost during a massive refactoring effort for the current version. As a workaround, you can put the transport.zip file for your packages under the project's assets or core directories, They will end up there when the package is installed. Then put code in your resolver to copy them to the core/packages directory.

      Hopefully, that feature will be back in the next release. If I have time, they may be automatically installed when your extra is installed.
        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
        • 3749
        • 24,544 Posts
        [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.

          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
          • 34120
          • 236 Posts
          Many thanks Bob, I've put this on hold for a little while but I'll be sure to try this out when I'm on it next.
            • 38290
            • 712 Posts
            Running into a similar scenario. I'm packing up an example site (oh how I wish MODX Cloud had public snapshots) and was looking into including other packages as sub packages. To add another twist, I'm using addressGPS Extra Template Variables with the Resources I'm using MyComponent to package.

            I decided to go with packaging addressGPS piece by piece (as if it weren't it's own component) with the tutorial so I can get all the TV values to come over, and then put in the Getting Started instructions to install the various other Extras.
              jpdevries
              • 3749
              • 24,544 Posts
              Let me know if you run into trouble.

                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
                • 38290
                • 712 Posts
                Quote from: BobRay at Apr 10, 2013, 01:13 AM
                Let me know if you run into trouble.

                Thanks. One thing I'm stuck on is getting Property Set properties pacakged. I got the Property Sets themselves making it through. When I run CheckProperties I don't see any output. I see my property sets being stubbed out in propertyset.resolver.php and transport.propertysets.php but in transport.propertysets.php the properties value is blank. It seems like the CheckProperties might not be working correctly, and if so I'm fine defining the properties myself. Do you know if they can be passed in as an array or just a string?
                  jpdevries
                  • 28042 ☆ A M B ☆
                  • 24,524 Posts
                  Vapor via HTML works fine on Cloud sites, unless they are too big.
                    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
                    • 38290
                    • 712 Posts
                    Why didn't I think of that?!

                    Quote from: sottwell at Apr 10, 2013, 06:15 AM
                    Vapor via HTML works fine on Cloud sites, unless they are too big.
                      jpdevries
                      • 3749
                      • 24,544 Posts
                      Quote from: dinocorn at Apr 10, 2013, 01:33 AM

                      Thanks. One thing I'm stuck on is getting Property Set properties pacakged. I got the Property Sets themselves making it through. When I run CheckProperties I don't see any output. I see my property sets being stubbed out in propertyset.resolver.php and transport.propertysets.php but in transport.propertysets.php the properties value is blank. It seems like the CheckProperties might not be working correctly, and if so I'm fine defining the properties myself. Do you know if they can be passed in as an array or just a string?

                      It's normal for the properties field to be blank. There should be a line at the end of each property set that sets its properties from another file. I remember fixing a bug related to this, so you may not have the fixed version.

                      IIRC, it works to pass them as a JSON string in the $properties field. I didn't do it that way because I thought people might want to edit them and having them in their own file makes that easier.



                        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