Tried to install PackMan on 3.0.1: failed

I would like to export some chunks and TVs from one site to import it into another site. Seems that the only extra for such operation is PackMan 1.2.1-pl (theboxer, 2014).

Trying to install this package I get following errors:
No foreign key definition for parentClass: MODX\Revolution\modMenu using relation alias: Action
and
Could not load package metadata for package packman. Upgrade your model.

I don’t want to handle such operations via database. Any ideas to solve my problem?

There exist other solutions and extras.
I don’t know if they work on MODX 3 or for your exact use case:

Thanks for this quick answer.

Teleport seems very difficult to me to install and use.
ExtraBuilder … need to try this tomorrow.

There is probably little need for such an extra? Ok, who develop only one site doesn’t need this feature. In case someone builds multiple sites with only a part of functions that should occur everywhere it would be a nice helpful extra.
Will experiment a little tomorrow.

Teleport is the tool, if you want to port Elements from one site to another.

there is also
theboxer/Git-Package-Management: MODX extra for building and managing external packages. (github.com)
which is used by developers to package Extras.
But you will need your Elements as static files in specific directories.
Once setup, it works great.

1 Like

@bruno17 Teleport is very complicated, the Git-Package-Management is also too much for me. I’m not a skilled programmer, I need a simple extra where I can define a new export and than choose the chunks and tvs by click that I would like to export. On the other site there should be a button “import”. That would be a very helpful tool.

Unfortunately, there is no such thing at the moment, so I will do everything by copy and paste.

Thank you for trying to help me @bruno17 and @halftrainedharry

1 Like

Hey folks …

I just wanted to resurrect this topic as I also miss the simple solution provided by PackMan since the move to MODX3.

The alternatives suggested all seem considerably more complex and I’ve yet to find any way of just simply copying MODX elements from one site to another, as was possible with PackMan.

I’ve spent some time with ExtraBuilder but I can’t for the life of me see how to achieve this with it. The website hosting the documentation for ExtraBuilder seems to have gone.

For now, I continue to copy & paste! :crazy_face:

I adapted the PackMan code to MODX 3 and created a pull request on Github.
(Unfortunately no-one seems to care to create a new package version.)


I can create a transport-package if you like, so that you can use/test the updated version.

1 Like

Sure - would be happy to test it!

Here is the link to the transport package:

You can use drag&drop in the “Extras” → “Installer” page to install it.

1 Like

Thanks @halftrainedharry - I’ll let you know how I get on!

Installed fine and appears in the Extras menu - but the page gives errors:

Try changing the name of the file core/components/packman/src/Packman.php to core/components/packman/src/PackMan.php (with an upper case letter “M”) to see if that helps.

1 Like

:+1: That’s me in the page now - will keep you posted …

1 Like

Hey @halftrainedharry

I’ve tested the following:

  • Exported each item type [templates, chunks etc] to individual transport packages on Site 1
  • Imported each to Site 2
  • Installed each on Site 2
  • Confirmed all items present
  • Uninstalled each package from Site 2
  • Confirmed all items removed [with the exception of subpackage installations - presumably by design]

And then …

  • Exported a single transport package from Site 1 containing one of each [templates, chunks etc]
  • Imported onto Site 2
  • Installed on Site 2
  • Confirmed all items present
  • Uninstalled the package from Site 2
  • Confirmed all items removed

Both sites MODX 3.0.4-pl / PHP 8.2

Everything looks great to me - nice to see this great extra being brought back!

Just the Packman.php filename was the only issue, I think.

Hopefully the hosted extra package can get updated soon.

Happy to test further if any requests.

Thank you! :pray:

1 Like

Thanks for the testing!


The behavior of uninstalling packages with subpackages is very weird.
Personally I don’t think this functionality should be used.

2 Likes