Went to my site and bam - None of my CSS loaded. In SSH it seems my sub-theme directory was deleted.

This happened right after I ran drush --no-backup up -y

Gladly I didn't do any signicant changes to the files today, yet, this is indeed dangerous.

I suggest making sure any Basic updates won't delete any additional non-native content.

Even thought it's a starter theme and not a base --- An option to use it as such should be given and auto deletion should be removed.

Comments

Benia created an issue. See original summary.

joelpittet’s picture

Status: Active » Closed (works as designed)

Sorry we can't do that. That is part of how drush works and for people who have copied and renamed it with drush basic-install, may want to keep the original basic up to date to compare and update their theme with the changes in to basic.

Benia’s picture

Oh, I seem to have had a mistake here - I putted the subtheme inside the theme's folder, instead alongside.

http://drupal.stackexchange.com/questions/214550/drush-up-deletes-sub-th...

leahtard’s picture

Hey Benia,

Here is a good docs page: https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-t...

Cheers, Leah

joelpittet’s picture

Priority: Critical » Normal

Thanks for the detail on the problem. Maybe you'd like to contribute to a small README change to help support that idea to not put the sub theme in the base theme/original themes directory?

Benia’s picture

Yes. Under the Installation chapter, I would suggest adding a third chapter:

3. Using Basic as a base theme:

Even though Basic is meant to be used as a starter theme, it can be used as a base theme for one or more child themes. Directions on how to create child themes from usually any Drupal theme, can be found here:

https://www.drupal.org/docs/8/theming-drupal-8/creating-a-drupal-8-sub-t...

Don't put the sub theme's directory inside your Basic directory, Otherwise, drush up will delete it in the next update; Hence, make sure that when you create the sub theme, you put its directory under root/themes alongside the original Basic directory.