【发布时间】: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