-4

i keep getting this error. The error goes away when i remove the info.yml file from the subtheme. I upload the subtheme in the root theme directory. I've added the error message along with the info.yml file, libraries.yml file, and the .theme file below.

Drupal\Core\Extension\InfoParserException: Missing required keys (name) in themes/jetsetterguide/Jetsetterguide.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 57 of core/lib/Drupal/Core/Extension/InfoParserDynamic.php). Drupal\Core\Extension\InfoParser->parse() (Line: 554) Drupal\Core\Extension\ExtensionList->createExtensionInfo() (Line: 266) Drupal\Core\Extension\ThemeExtensionList->createExtensionInfo() (Line: 316) Drupal\Core\Extension\ExtensionList->doList() (Line: 113) Drupal\Core\Extension\ThemeExtensionList->doList() (Line: 282) Drupal\Core\Extension\ExtensionList->getList() (Line: 72) Drupal\Core\Extension\ThemeHandler->listInfo() (Line: 55) Drupal\Core\Theme\ThemeAccessCheck->checkAccess() (Line: 69) Drupal\Core\Theme\ThemeNegotiator->determineActiveTheme() (Line: 405) Drupal\Core\Theme\ThemeManager->initTheme() (Line: 96) Drupal\Core\Theme\ThemeManager->getActiveTheme() (Line: 75) Drupal\Core\Render\ElementInfoManager->getInfo() (Line: 816) Drupal\Core\Form\FormBuilder->prepareForm() (Line: 284) Drupal\Core\Form\FormBuilder->buildForm() (Line: 73) Drupal\Core\Controller\FormController->getContentResult() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 580) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 169) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->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: 23) Stack\StackedHttpKernel->handle() (Line: 718) Drupal\Core\DrupalKernel->handle() (Line: 19)

Here is the info.yml file I've added:

1
  • Please delimit the code blocks. They are illegible.
    – cilefen
    Sep 22, 2023 at 4:07

1 Answer 1

0

You need to pay attention to the details.

  1. Theme machine names (name of files) need to be all lowercase.
  2. Your .theme file is missing an opening <?php tag.
  3. Global-styling: needs to be lowercase as well, and the line break removed.
  4. In the info file everything below regions: needs to be indented.
  5. In the info file everything below libraries: needs to be indented and prefixed with a - .
5
  • i have corrected all but now getting this error: Drupal\Core\Extension\InfoParserException: Missing required keys (name) in themes/jetsetterguide/Jetsetterguide.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 57 of core/lib/Drupal/Core/Extension/InfoParserDynamic.php).
    – beauthis6
    Sep 26, 2023 at 22:57
  • im fairly new to drupal.
    – beauthis6
    Sep 26, 2023 at 23:14
  • is it saying the name key missing. if thats causing the error. the name key for the subtheme is there.
    – beauthis6
    Sep 26, 2023 at 23:18
  • @beauthis6 – Jetsetterguide.info.yml still is uppercase. Fix it. In all file names. That's the first 1.) point in my answer.
    – leymannx
    Sep 27, 2023 at 6:09
  • thanks for the reply @leymannx still getting the same error code: Drupal\Core\Extension\InfoParserException: Missing required keys (name) in themes/jetsetterguide/jetsetterguide.info.yml in Drupal\Core\Extension\InfoParserDynamic->parse() (line 57 of core/lib/Drupal/Core/Extension/InfoParserDynamic.php).
    – beauthis6
    Sep 27, 2023 at 20:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.