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

drupal-finder is unable to find the drupal-root directory when installed in a subdirectory #41

Closed
wants to merge 4 commits into from

Conversation

JTubex
Copy link

@JTubex JTubex commented Mar 28, 2019

Follow-up from issue mentioned in drush-ops/drush#4019.

When Drupal is installed in a subdirectory, drupal-finder is unable to find the drupal-root directory.

To reproduce using drush:

  1. e.g. Site is located in /var/www/release/1.0.0/htdocs
  2. Create a symlink /var/www/current -> /var/www/release/1.0.0
  3. The website is now accessible in /var/www/current/htdocs.
  4. Execute drush in /var/www/current/htdocs.

Or see the test in this pull request.

@JTubex JTubex changed the title Add test for finding Drupal root in symlinked parent directory drupal-finder is unable to find the drupal-root directory when installed in a subdirectory Mar 28, 2019
@webflo
Copy link
Owner

webflo commented Mar 28, 2019

Thanks for the test. Could you try to execute drush in /var/www/current/?

@JTubex
Copy link
Author

JTubex commented Mar 28, 2019

@webflo,

When executing drush cr in /var/www/current, I get the following error:

Command cache-rebuild needs a higher bootstrap level to run - you will need to invoke drush from a more functional Drupal environment to run this command.                                       [error]
Command cache-rebuild requires Drupal core version 8+ to run.                                                                                                                                    [error]
The drush command 'cr' could not be executed.

@webflo
Copy link
Owner

webflo commented Apr 8, 2019

Could you run this command with the --debug --verbose? Thanks!

@webflo webflo mentioned this pull request Apr 8, 2019
@webflo
Copy link
Owner

webflo commented Apr 8, 2019

Hi @JTubex, i looked at your test and its not quite correct. testDrupalDefaultStructureWithRealFilesystemInSubdirectory create a Drupal site with the classic layout (composer.json and vendor folder inside the docroot). There is no Drupal site above the webroot. Drush-launcher does not support setups. I wrote a new test (testDrupalComposerStructureWithRealFilesystemInSubdirectory). This tests create a layout similar to drupal-composer/drupal-project. The Drupal Site is accessible above the docroot.

@JTubex
Copy link
Author

JTubex commented Apr 9, 2019

@webflo, thanks for your help. Since drush-ops/drush#4019 is merged, the problem I had is solved, so I will close this PR.

@JTubex JTubex closed this Apr 9, 2019
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

Successfully merging this pull request may close these issues.

2 participants