Drupal core 8.1.9
Im sorry - Im newbie and my English very bad =(
I tried make Zircon sub theme, but get error:
Warning: include_once(themes/zircon_subtheme/assets/includes/skins-menu/skins_menu.inc): failed to open stream: No such file or directory in include_once() (line 7 of D:\Sites\Apache\htdocs\sh15\themes\zircon\zircon.theme).
I investigated zircon.theme at line 7 and see something:
include_once(drupal_get_path('theme', $active_theme) . '/assets/includes/skins-menu/skins_menu.inc');
My folder with sub theme contains only two file:
/themes/zircon_subtheme/zircon_subtheme.info.yml:
name: zircon_subtheme
type: theme
base theme: zircon
description: This is a sub theme of Zircon
version: 8.1.3
core: 8.x
libraries:
- zircon_subtheme/global-styling
regions:
header: Header
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
main_menu: 'Main menu'
slideshow: Slideshow
help: Help
page_top: 'Page top'
page_bottom: 'Page bottom'
messages: Messages
featured: Featured
breadcrumb: Breadcrumb
content: Content
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
panel_first_1: 'Panel first col 1'
panel_second_1: 'Panel second col 1'
panel_second_2: 'Panel second col 2'
panel_second_3: 'Panel second col 3'
panel_second_4: 'Panel second col 4'
footer: Footer
/themes/zircon_subtheme/zircon_subtheme.libraries.yml:
global-styling:
version: 8.0.0
css:
base:
assets/css/style.css: {}
Can I do something for fix it problem? =) Thank you.
Comment | File | Size | Author |
---|---|---|---|
#7 | 2803829-7-after.png | 55.34 KB | Shyam_Bhatt |
#6 | zircon-subtheme_include_once-2803829-6.patch | 669 bytes | kyberman |
#4 | zircon-subtheme_include_once-2803829-4.patch | 609 bytes | johnnydarkko |
Comments
Comment #2
Znak CreditAttribution: Znak commentedYou can add the assets folder with all files to your subtheme. It fixes problem on my site
Comment #3
Znak CreditAttribution: Znak commentedComment #4
johnnydarkko CreditAttribution: johnnydarkko at Sage Tree Solutions commentedCopying a library file over is more of a pain to maintain than just changing the include to be specifically from the zircon directory when the active theme is a subtheme of zircon. Here's a patch to do just that.
Comment #5
johnnydarkko CreditAttribution: johnnydarkko at Sage Tree Solutions commentedUpdated title.
Comment #6
kybermanThank you, the patch makes sense. I adapted it a little bit, so it works with the latest code.
Comment #7
Shyam_Bhatt CreditAttribution: Shyam_Bhatt at QED42 commentedThe "zircon-subtheme_include_once-2803829-6.patch" patch is working fine.
Please check the below code after applying the patch, when we created the subtheme the warning will not be displayed.