In the final step of the wizard, I got the following error message:

Unable to create sites/default/themes.                                                                                           [error]
Failed to generate subtheme.                                                                                                     [error]

This is because my chosen directory (1) didn't exist and (2) the /sites/default directory was not writable.

1. SUPER annoying because now I have to walk through the entire wizard again. Is there a way to deal with this in the wizard? I don't think you want to pick the location first (i.e. change the order of the wizard steps)...but I wonder if you want to put the risk-of-failure stuff closer to the beginning so that you're losing less work if it fails?

2. Should there be an output at the end of the error message which says something to the effect of, "Before running the wizard again, ensure you have created the destination folder for your new sub-theme and it is writable by the drush user." ?

(very, very low priority and should be an obvious fix if people run into the problem)

Comments

fubhy’s picture

what we can do is this: Set up a while() loop at the end of the wizard where it moves the generated theme folder from the temporary folder to its final destination. If that operation fails, give a verbose error message so that it can be fixed, once the permissions are good, you can hit enter again and it tries it again... and again... and again... :)

Do you want to try again? (y/n)

emmajane’s picture

Hm. In theory I'd need a new shell window open to be able to fix the error without leaving the wizard? I don't usually work with screen, or generally split my work on a server into multiple areas...so this wouldn't help me. I'm pretty inefficient though, so it might be perfect for "normal" people?

fubhy’s picture

you can still break out of the check by simply going CTRL+C or [no] for cancel ([yes] = try again).

emmajane’s picture

Just to confirm: Breaking out of the check would also force me to restart the wizard, right?

fubhy’s picture

Yes... What we can do is this: Generate the "drush omega-subtheme" command according to your input for the "drush omega-wizard" command and simply do something like this:

"There seems to be a problem with the permissions on the destination folders. Please fix... blablabla... and then run this command:

drush omega-subtheme --machine-name=something .... (<--- direct command according to the previous input)

emmajane’s picture

Works for me! Especially considering sites/default is no longer a valid path per #1902818: sites/default is not a valid destination for a subtheme, remove it from the list of available paths.

fubhy’s picture

I still want to do this before the release. It's actually pretty simple as we assemble the command for "drush osub" anyways. We just gotta print it.

fubhy’s picture

Issue summary: View changes
Status: Active » Fixed

The destination option is now simply path-based making this issue obsolete.

Status: Fixed » Closed (fixed)

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