Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to add package containing resources #132

Open
smaddock opened this issue Mar 23, 2020 · 2 comments
Open

Unable to add package containing resources #132

smaddock opened this issue Mar 23, 2020 · 2 comments

Comments

@smaddock
Copy link

smaddock commented Mar 23, 2020

If I run the following command from a snippet, it executes just fine:
$res = $this->modx->runProcessor('resource/create', $resource);

However when that command is run from GPM as part of adding a package, with the same options in $resource, it breaks. Unfortunately no errors are logged anywhere other than the Manager UI displaying "Access denied" error, but through a manual stack trace I've traced it down to:

GitPackageManagementCreateProcessor->createResource: 727 "runProcessor" never returns
modX->runProcessor:1764 "run" never returns
modProcessor->run: 177 "process" never returns
modObjectCreateProcessor->process: 680 "cleanup" never returns
modResourceCreateProcessor->cleanup: 206 "success" never returns
modProcessor->success: 105 "success" never returns
modError->success: 272 "process" never returns
modError->process: 142 "resetLogging" never returns
modRegistry->resetLogging: 192 "setLogTarget" never returns
xPDO->setLogTarget: 1988 setting "$this->logTarget" fails

The value trying to be set is:
Array => {"target":"FILE","options":{"filename":"error.log"}}

Based on the Manager popup error, I’m guessing the file path is not set correctly when the processor is called from GPM, but I don’t know how to see what it is set to or how to make sure it’s set correctly.

@smaddock
Copy link
Author

Note this occurs when following the instructions at http://theboxer.github.io/Git-Package-Management/config/package/#resources ... when the resources array is included as part of the package JSON object in config.json, GitPackageManagementCreateProcessor->createResource calls runProcessor as noted above.

@smaddock
Copy link
Author

To further clarify, the first resource is created, before the failure documented above, which halts the install script and prevents any additional resources from being created.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant