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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mildok created an issue. See original summary.

Znak’s picture

You can add the assets folder with all files to your subtheme. It fixes problem on my site

Znak’s picture

Status: Active » Needs review
johnnydarkko’s picture

Version: 8.x-1.x-dev » 9.1.x-dev
Component: Miscellaneous » Code
FileSize
609 bytes

Copying 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.

johnnydarkko’s picture

Title: Warning in sub theme include_once() (line 7 of D:\Sites\Apache\htdocs\sh15\themes\zircon\zircon.theme) » Zircon subtheme fails to include zircon include file skins_menu.inc

Updated title.

kyberman’s picture

Category: Support request » Bug report
FileSize
669 bytes

Thank you, the patch makes sense. I adapted it a little bit, so it works with the latest code.

Shyam_Bhatt’s picture

Status: Needs review » Reviewed & tested by the community
FileSize
55.34 KB

The "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.

2022-10-04/2803829-7-after.png