I am using the Tara theme, which has a library global-styling. I have created a sub-theme of it, called Art. I want to extend the original library. My setup is as follows:

In themes/custom/art/art.info.yml

name: art
type: theme
base theme: tara
description: 'Art theme based on Tara'
package: Art
core: 8.x
version: 8.1.0
    - art/local-styling
  header_top: 'Header Top'
  site_branding: 'Site Branding'
  primary_menu: 'Primary menu'
  search_box: 'Full Page Search'
  page_top: 'Page top'
  page_bottom: 'Page bottom'
  highlighted: Highlighted
  breadcrumb: Breadcrumb
  content: Content
  content_top: 'Content Top'
  content_bottom: 'Content Bottom'
  content_home: 'Homepage Content'
  sidebar_first: 'Sidebar Left'
  sidebar_second: 'Sidebar Right'
  footer_top: 'Footer Top'
  footer_first: 'Footer first'
  footer_second: 'Footer second'
  footer_third: 'Footer third'
  footer_fourth: 'Footer fourth'
  footer_bottom: 'Footer Bottom'

And in art.libraries.yml

  version: 1.x
      css/art.css: {}

The result of the page load is a WSOD and an entry in the error log of:

Uncaught PHP Exception `Drupal\\Core\\Asset\\Exception\\InvalidLibrariesExtendSpecificationException:  "The specified library "art/local-styling" does not exist." at /var/www/html/art/staging/web/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php line 149`

The sub-theme IS the enabled and default theme. Adding the path of its css file as an entry under the base theme's library results in the file being loaded.

  • Have you tried clearing cache? – sonfd Apr 4 at 23:50
  • In all the various iterations of trying to solve this, I have cleared both cache and browser cache dozens of times. – JAyenGreen Apr 4 at 23:52

Your Answer

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

Browse other questions tagged or ask your own question.