- Issue created by @rkoller
- ๐ฉ๐ชGermany rkoller Nรผrnberg, Germany
the following issue ๐ Wrong DRUPAL_ROOT with non-standard code structure Needs work might be also relevant for drupal sites in production as soon as it gets committed?
- ๐ฌ๐งUnited Kingdom joachim
If I understand it correctly, the problem is that Project Browser creates a temporary Composer project in a temporary folder, using a copy of the project's composer.json file.
In joachim-n/drupal-core-development-project, Drupal core is coming from a Composer path repository, which is declared in composer.json with a relative path.
So I think this problem will happen if there are *any* Composer path repositories -- e.g. with https://github.com/joachim-n/drupal-project-contrib-development, or if there are any other packages being used like that.
I don't think ๐ Wrong DRUPAL_ROOT with non-standard code structure Needs work is relevant here, as that is to do with fixing Drupal core so it works properly when using a path repository.
- ๐ฌ๐งUnited Kingdom joachim
If I'm right about the problem, then the fix would be for the process that copies the project's composer.json file to check the 'repositories' property for any repos which are path repos, check those for any relative paths, and the prefix the absolute directory path of the project to that URL in the temporary copy.
- ๐ฉ๐ชGermany rkoller Nรผrnberg, Germany
The issue can be fixed by applying the following command according to @chrisfromredfin
ddev drush cset -y package_manager.settings include_unknown_files_in_project_root true
, I think it is ok deliberately enabling including unknown files found in the project root and not making it automatically working per default.
but i see another problem then here. it is not clear at all based on the error message in the issue summary what the actual problem is and how to fix it. Instead of labeling it with "StageException: Failed to run process" and providing a cryptic cmd line output, how about explain what is actually happening instead, that some unknown files/directories are included in the project root and that is the reason why the install fails (include one or two examples)? and provide the drush command how to enable those unknown files to the user as well:ddev drush cset -y package_manager.settings include_unknown_files_in_project_root true
. that would be way more clear and directly actionable. - ๐ฌ๐งUnited Kingdom joachim
> ddev drush cset -y package_manager.settings include_unknown_files_in_project_root true
I presume that copies over any files from the project root over into the staging project? If there is a clone of Drupal core in repos/drupal, then that's a LOT of files to copy!
I think amending the path repo to point to the same place would be simpler and quicker!
- ๐บ๐ธUnited States phenaproxima Massachusetts
This is because Package Manager ignores any unrecognized files/dirs in the project root.
The workaround is to set
package_manager.settings:include_unknown_files_in_project_root
(config flag) totrue
. - ๐บ๐ธUnited States phenaproxima Massachusetts
Re #7: I agree, but that's not something Package Manager is willing to do :) If you change the path repos in composer.json to use absolute paths instead of relative paths, that would probably fix the problem without needing to change that Package Manager setting.
- Status changed to Closed: won't fix
8 months ago 6:53pm 16 November 2024 - ๐บ๐ธUnited States chrisfromredfin Portland, Maine
Closing this since there are workarounds. Would be willing to resurrect later if there is huge adoption or more complications..