I have tried to create a sub-theme using Drupal 10.2.5 . However, I get the following error when trying to render the site:
The website encountered an unexpected error. Try again later.
Twig\Error\LoaderError: Template "themes/contrib/porto_sub/templates/includes/header.html.twig" is not defined in "themes/contrib/porto_theme/templates/page--front.html.twig" at line 3. in Twig\Loader\ChainLoader->getCacheKey() (line 99 of /var/www/drupal/vendor/twig/twig/src/Loader/ChainLoader.php).
Twig\Environment->getTemplateClass() (Line: 204)
Drupal\Core\Template\TwigEnvironment->getTemplateClass() (Line: 319)
Twig\Template->loadTemplate() (Line: 43)
__TwigTemplate_5d1c2cfd096e190d0f9c4f262fc605fb->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 39)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 480)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 475)
Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 5720)
__TwigTemplate_af37f2d33a0f6ab912bbc62cb675f865->doDisplay() (Line: 394)
Twig\Template->displayWithErrorHandling() (Line: 367)
Twig\Template->display() (Line: 379)
Twig\Template->render() (Line: 38)
Twig\TemplateWrapper->render() (Line: 39)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 480)
Drupal\Core\Render\Renderer->doRender() (Line: 240)
Drupal\Core\Render\Renderer->render() (Line: 158)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 153)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse() (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
call_user_func() (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch() (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
Use the following command to generate the sub-theme:
./web/core/scripts/drupal.sh generate-theme porto_sub --starterkit=porto_theme
Active
1.5
Code