We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
  • I have created several packages I’d like to release into the repository, but my build script is not packaging in the core directory. Everything else seems to be getting packaged properly, and no errors are generated. I made the build script as a merger between splittingred’s Quip build script and the MyComponent build script to use with all of my components.

    The exact code I’m using for two of the addons is available on GitHub:

    I run the build.transport.php from my browser, and all of the log messages are echo’ed successfully. The packages appears for install in my packages directory and get installed properly - at least in terms of settings/ snippets/ plugins - but no folder appears in the installation’s /core/components/ directory.

    As you can see, the build.transport.php file has true/false switches that toggle which parts of the script get run, which allows it to be used for multiple packages. In both of them, $hasCore is set to true, and the core is set to package just like in the docs.

    What am I doing wrong? I’m sure there’s a stupid mistake somewhere, but for the life of me, I cannot find it.

    Here is my environment information:

    • Tried it on the following versions of MODx Revolution traditional install: 2.1.0-rc4 (wamp), 2.1.1-pl (wamp and linux), and 2.0.7-pl (linux)
    • Tried it on the following servers:
      [list]
      [li]Linux w/ Apache version 2.2.17, PHP version 5.2.15, MySQL version 5.1.52, Kernel version 2.6.38.7, pdo installed on both
    • Windows XP w/ WampServer Version 2.1 w/ all the defaults
    [/li]
    [li]Browser: Google Chrome 12.0.742.68 beta-m[/li]
    [li]Database connection and encoding: UTF-8 unicode-ci[/li]
    [/list]
      WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
      • 3749
      • 24,544 Posts
      You need this line just below the if ($hasCore) section:

      $builder->putVehicle($vehicle);


      You need to do that for each vehicle, before creating another one.

        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
      • Thank you thank you thank you! I don’t have to toss my computer out the window after all. laugh

        I removed the extra [tt]$vehicle = $builder->createVehicle($category,$attr);[/tt] between the resolvers and it works great now.

        By the way, thanks for making MyComponent so flexible.
          WebsiteZen.com - MODX and E-Commerce web development in the San Francisco Bay Area
          • 3749
          • 24,544 Posts
          Quote from: Oleg at Jun 05, 2011, 07:04 AM


          By the way, thanks for making MyComponent so flexible.
          I’m glad it worked for you.
            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