We just experienced data loss for a client site hosted on Pantheon due to a combination of #886184: Store CSS info in database (and export it to files directory) never being resolved and Pantheon assuming that css_injector files can be regenerated. As most of you already know, they can not.

I've opened an issue w/ Pantheon support. The response was that they will make a feature request removing the css_injector files from the list of files they ignore.

The steps to reproduce the issue on Pantheon are very easy to reproduce.

  1. Create a site on Pantheon using any distribution
  2. Add and enable CSS Injector
  3. Add custom CSS. Something like #main {background: #CCC} is easy to see.
  4. Create a backup
  5. Restore site from the backup

If you download the files portion of your backup you will see it includes a skipped.log. The top of that file states...

Below is a list of files we were unable to include in this backup. These files
are not missing, but were not available in our file-store cloud at the time the
tarball was made or are not backed up because they can be generated. In almost
all cases these will be resolved the next time you generate a backup or export.

You will also see that it includes

/css_injector/css_injector_1.css: Generated files are not backed up

While some elements of the CSS Injector are stored in the database, the crucial CSS is not. The result is any customizations a user makes using CSS Injector are lost when the site is restored from backup and when moving files between dev <-> test <-> live.

Because this is a popular Drupal module and Pantheon is a popular host for Drupal site, it would be helpful to warn users with a note on the project page until this issue is resolved.

Comments

kreynen’s picture

Status: Active » Fixed

I reported what I believe is the bug in Pantheon's backup process 2 weeks ago. At the very least, the documentation found at http://helpdesk.getpantheon.com/customer/portal/articles/683566 is wrong. Instead of "the following items are not backed up", it should say any file or directory that starts with 'styles', 'css', 'js', etc is not backed up.

Created a YouTube video documenting the bug and added it to the project page. The 2.x version of the module can actually regenerate the .css files from the database so skipping the files in the backup doesn't cause the lost of the actual CSS.

I've opened #2329309: Add 1.x version of CSS Injector to list of modules not recommended for Pantheon.

Not really anything else I can do about this.

Status: Fixed » Closed (fixed)

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

vinmassaro’s picture

FWIW, this is no longer an issue on Pantheon.

kreynen’s picture

@vinmasssaro That's great. Unfortunately this project isn't really maintained. I put some time into the 7.x-3.x branch, but we don't use this at the University of Colorado so I can't justify spending time on this.

Are you using this at Yale? Would you like to be added as a co-maintainer?

vinmassaro’s picture

Sorry, I won't have the time to be a maintainer on it. We do use this module at Yale and Pantheon fixed this bug since we hit on it with a lot of our sites. We will not being doing much further with CSS Injector as we are beginning to work on D8 and it looks like Asset Injector module is the way forward there.