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

fastangel’s picture

Status: Active » Needs work

I 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?

jon pugh’s picture

Priority: Critical » Major

Oh, 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.

fastangel’s picture

jon pugh’s picture

Version: » 6.x-1.x-dev
Category: bug » feature
Status: Needs review » Needs work

Is 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"

helmo’s picture

This 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

fastangel’s picture

@helmo Yes sorry :( was a little error.

christefano’s picture

@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.

jon pugh’s picture

We 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?

helmo’s picture

If you can conclusively test that there is only one, and a log line is added which mentions this detection.... +1

christefano’s picture

How 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.

John Carbone’s picture

Issue summary: View changes

Trying 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?

jon pugh’s picture

To 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.

jon pugh’s picture

jon pugh’s picture

Assigned: Unassigned » jon pugh
Priority: Major » Critical

Just bumping this to remind myself to work on it.

jon pugh’s picture

Status: Needs work » Fixed
Issue tags: -Release-blocker

I'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 .

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.