For some git repos, like one from Acquia Dev Cloud, the Drupal root is not the root of the git repo. We should add an option to devshop_provision that would save the "path_to_drupal" or something so that we can support these kinds of repos.
For some git repos, like one from Acquia Dev Cloud, the Drupal root is not the root of the git repo. We should add an option to devshop_provision that would save the "path_to_drupal" or something so that we can support these kinds of repos.
Comments
Comment #1
fastangel commentedI thought in two solutions:
* If the repository is invalid drupal installation. Search recursively for find index.php and when I find use how drupal directory.
* Use a checkbox with text "The drupal installation is". If the checkbox is enable then allow write a relative path in a textfield.
What do you think that is better?
Comment #2
jon pughOh, definitely the textfield option. We don't even need the checkbox, just make it say
Path to Drupal
[__________________________]
Enter the relative path to the index.php file in your repository. Leave blank if index.php is in the root.
Comment #3
fastangel commentedDone two commits: http://drupalcode.org/project/devshop_hosting.git/commit/9b91454 and http://drupalcode.org/project/devshop_provision.git/commit/ec8731a
I used for test this repo: https://github.com/jacintocapote/devshop_docroot
Comment #4
jon pughIs this form item on the settings page of the wizard? We're hiding this now... I am torn about putting it on the first step because I don't want to clutter up the form....
Perhaps we can detect this automatically... it shouldn't be hard to search for the index.php and automatically detect the "path to drupal"
Comment #5
helmo commentedThis does sound useful, although I don't have a repo that needs this at the moment.
An educated guess for a few standard locations would be nicer the cluttering the wizard. (just my 2 cents)
PS: @fastangel: The naming convention for hook_update_N is devshop_projects_update_6101 instead of devshop_projects_update_1
Comment #6
fastangel commented@helmo Yes sorry :( was a little error.
Comment #7
christefano commented@Jon Pugh: re #4, I'd love to be able to configure the docroot when creating a DevShop project. Right now this is a dealbreaker for using DevShop with existing repositories.
Comment #8
jon pughWe should be able to search recursively on project verify for any index.php's in order to automate this. if we find more than 1 we can still throw an error, in which case, you really should fix your repo! :)
Would the community give a +1 to automated drupal folder finding within the repo?
Comment #9
helmo commentedIf you can conclusively test that there is only one, and a log line is added which mentions this detection.... +1
Comment #10
christefano commentedHow about an "advanced" fieldset where the path_to_drupal setting can be manually configured to point to the correct index.php?
There will likely be multiple index.php files when a repo has multiple copies of Drupal (i.e. a non-multisite configuration where Drupal is in a subdirectory of another site) or when a repo includes third-party code (e.g. WYSIWYG libraries).
These are edge cases, but I think they'd be common enough to be an issue.
Comment #11
John Carbone commentedTrying out DevShop (great work btw) but what #7 said about this being a dealbreaker. Another +1 for #8, maybe with the option to override whatever the automated test found so the edge cases have a way to deal with their non-standard setup?
Comment #12
jon pughTo be clear, this is fully configurable on a per-project basis.
This issue is only still in "Needs Work" because I'd like to implement #7.
To enable selecting the docroot when creating a project, simply uncheck "Skip Settings Page" on the DevShop Projects settings form. (admin/hosting/devshop/projects).
When unchecked, there is an additional step in the project creation form where you can set both the project code root and the "path to drupal".
I admit this is very unclear. This should be much more obvious.
Comment #13
jon pughComment #14
jon pughJust bumping this to remind myself to work on it.
Comment #15
jon pughI'm calling this fixed because it is technically possible, and opening up a new issue just about improving the UI. See #2321429: Create Wizard Improvements: Include settings form, path to drupal, and remove environments. for follow up .