【问题标题】:Drupal 8 problems adding and extend asset librariesDrupal 8 添加和扩展资产库的问题
【发布时间】:2015-12-30 11:13:16
【问题描述】:

我尝试构建 Drupal 8 主题,但资产库遇到了一些问题。

网站保持白色,apache错误日志抛出php异常:

Uncaught PHP Exception Drupal\\Core\\Asset\\Exception\\InvalidLibrariesExtendSpecificationException: "The specified library "radweiser/main-style" does not exist." at /Users/****/Sites/dev/radweiser/web/core/lib/Drupal/Core/Asset/LibraryDiscoveryCollector.php line 168

我使用 bootstrap Drupal 8 Theme 作为我的基本主题。 这是我名为 radweiser 的主题的 yml 文件:

radweiser.info.yml

name: radweiser
type: theme
description: Drupal 8 Theme
version: 0.1.0
core: 8.x
base theme: bootstrap
screenshot: images/screenshot.png
libraries:
- radweiser/global-styling
- radweiser/main-style

libraries-extend:
  bootstrap/base-theme:
    - radweiser/main-style

regions:
  navigation: 'Navigation'
  navigation_collapsible: 'Navigation (Collapsible)'
  header: 'Top Bar'
  highlighted: 'Highlighted'
  help: 'Help'
  content: 'Content'
  sidebar_first: 'Primary'
  sidebar_second: 'Secondary'
  footer: 'Footer'
  page_top: 'Page top'
  page_bottom: 'Page bottom'

radweiser.libraries.yml

global-styling:
  version: VERSION
  css:
    theme:
      styles/global.css: {}

main-styles:
  version: VERSION
  css:
    theme:
      styles/main.css: {}

有人知道这个问题吗?

【问题讨论】:

  • 您好,您使用的是 Drupal 核心的当前 --dev 版本?
  • 我使用的是 8.0.1 稳定版

标签: php drupal yaml assets drupal-8


【解决方案1】:

这只是一个错字

主风格/主风格

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2012-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-11-11
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多