1

I have a site (Drupal 8.4.2) that has Bootstrap and a subtheme located in:

/sites/themes/

With the upgrade from 8.3 to 8.4, I have started using Composer, and subsequently used Composer to upgrade Bootstrap. This added it to my composer.json (I'd previously installed Boostrap using drush), but also put the updated version of Bootstrap here (without touching my existing Bootstrap folder):

/sites/themes/contrib/

I removed my existing Bootstrap folder and cleared the cache. However, I can no longer manage the Boostrap theme or my subtheme - I get a 500 error like this:

PHP Fatal error: require(): Failed opening required '/var/www/html/drupal/mysite/themes/bootstrap/src/Bootstrap.php' (include_path='.:/usr/share/pear:/usr/share/php') in /var/www/html/drupal/mysite/vendor/symfony/class-loader/ApcClassLoader.php on line 110

The issue, clearly, is that it's looking for Bootstrap in the old location. The question is - what do I need to do to ensure my site finds Bootstrap in the correct folder? Moving the updated version of Bootstrap from contrib/ to where the original version was located fixes the problem for now, but I'd like to fix it permanently.

I assume there is a config value somewhere that isn't being touched by clearing the cache.

1
  1. Put your old theme back into the old location.
  2. Enable and set Bartik theme as default theme.
  3. Uninstall the old theme.
  4. Move your old theme to the new location.
  5. Enable the old theme and set as default again.
  6. Uninstall Bartik.

Voilà

  • Thanks. I guess that would work, but I also assume it will reset all my block positioning? – millionleaves Aug 28 '18 at 2:31
  • @millionleaves – If you before relocating the theme have exported the config, and then after relocating the theme reimport the config, you may have no problem with that. Would be interesting to know if it worked that way for you. – leymannx Aug 28 '18 at 15:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.