When I try to build my modx-extra, it fails… It looks like there is no packageBuilder in /core/model
What version of MODX are you using?
What’s the code in your build script (line 43) that throws the error?
If this worked in MODX 2, but you are now using MODX 3, you probably have to change the code in the build script.
In MODX 2, the class “modPackageBuilder” is in core/model/modx/transport/modpackagebuilder.class.php
. In MODX 3 it’s in core/src/Revolution/Transport/modPackageBuilder.php
.
Thanks!
$modx->loadClass('transport.modPackageBuilder', MODX_CORE_PATH . "src/Revolution/Transport/modPackageBuilder.php", true, true);
When I paste this code, it still gives an error. Am I doing something wrong?
So is this MODX 3?
In MODX 3 I don’t think you need the loadClass()
function at all, as you can use the fully qualified class name → MODX\Revolution\Transport\modPackageBuilder
.
But generally it’s hard to say what you are doing wrong without seeing the code.
Thanks, it worked!
I’m following the “modX Extra Tutorial” form their official documentation website. Everything was going smooth until I was gonna export / transport my package.
The modPackageBuilder error has been fixed, thanks, but now I get total different errors.
In my transport.menu.php their is this line: “$action = $modx->newObject('modAction');
”
Now I get this error:
Could not load class: modAction from mysql.modaction
I’m using modX 3, do I also need to import it with the class name like " MODX\Revolution\Transport\modPackageBuilder
"?
The class modAction has been removed in MODX 3 and is no longer available:
https://docs.modx.com/3.x/en/getting-started/upgrading-to-3.0/actions
modAction was used when a controller is called. But this is no longer necessary. Just add the values for action
and namespace
directly to the modMenu object.