drupalninja / drupalx-project

Project repo for the DrupalX theme and installation.
GNU General Public License v2.0
14 stars 1 forks source link

Logo error once subtheme is created #6

Open paulfm opened 6 days ago

paulfm commented 6 days ago

Just starting to evaluate the drupalx-project and I ran into a problem as soon as I set up a subtheme and set it as default. I have added the logo into the subtheme folder as well as using settings to upload a logo before making it the default theme.

The website encountered an unexpected error. Try again later.

Drupal\Core\Render\Component\Exception\InvalidComponentException: [site_logo] NULL value found, but a string or an object is required. This may be because the property is empty instead of having data present. If possible fix the source data, use the |default() twig filter, or update the schema to allow multiple types. in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 203 of core/lib/Drupal/Core/Theme/Component/ComponentValidator.php).

drupalninja commented 4 days ago

I will take a look thanks for raising

drupalninja commented 4 days ago

Seeing this error:

The website encountered an unexpected error. Try again later.

Drupal\Core\Config\ConfigDuplicateUUIDException: Attempt to save a configuration entity 'nameoftheme_pagetitle' with UUID '94e6f201-8ab2-4321-96a2-e05c9ca52c6a' when this UUID is already used for 'drupalx_theme_pagetitle' in Drupal\Core\Config\Entity\ConfigEntityBase->preSave() (line 309 of core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php). Drupal\block\Entity\Block->preSave() (Line: 528) Drupal\Core\Entity\EntityStorageBase->doPreSave() (Line: 483) Drupal\Core\Entity\EntityStorageBase->save() (Line: 257) Drupal\Core\Config\Entity\ConfigEntityStorage->save() (Line: 354) Drupal\Core\Entity\EntityBase->save() (Line: 613) Drupal\Core\Config\Entity\ConfigEntityBase->save() (Line: 389) Drupal\Core\Config\ConfigInstaller->createConfiguration() (Line: 102) Drupal\features\FeaturesConfigInstaller->createConfiguration() (Line: 260) Drupal\Core\Config\ConfigInstaller->installOptionalConfig() (Line: 164) Drupal\Core\Config\ConfigInstaller->installDefaultConfig() (Line: 251) Drupal\Core\Extension\ThemeInstaller->install() (Line: 212) Drupal\system\Controller\ThemeController->setDefaultTheme() call_user_func_array() (Line: 123) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 638) Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97) Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber{closure}() (Line: 181) Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76) Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 50) Drupal\ban\BanMiddleware->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: 741) Drupal\Core\DrupalKernel->handle() (Line: 19)

drupalninja commented 4 days ago

Fixed uuid issue, next problem:

The website encountered an unexpected error. Try again later.

Twig\Error\LoaderError: Template "nameoftheme:hero" is not defined in "themes/nameoftheme/components/hero/templates/block-content--hero.html.twig" at line 25. in Twig\Loader\ChainLoader->getCacheKey() (line 99 of /var/www/html/vendor/twig/twig/src/Loader/ChainLoader.php).

drupalninja commented 4 days ago

Clearing caches fixed the hero issue

drupalninja commented 4 days ago

I have been able to upload a new logo - can you update your drupalx_theme composer package and try again from scratch? If you still have the issue can you upload a screenshot of your settings?

drupalninja commented 4 days ago

Realize I need an automated test for starterkit generation so added one here: https://github.com/drupalninja/drupalx-project/pull/8

paulfm commented 4 days ago

I might be doing something wrong. I created a fresh project using the following steps:

  1. composer create-project drupalninja/drupalx-project:10.x-dev sellpahomes --no-interaction
  2. cd sellpahomes
  3. ddev config
  4. ddev install
  5. logged in to site and changed user 1
  6. ddev drush gerate theme
  7. copied regions from drupalx_theme.info.yml to sellpahomes.info.yml
  8. ddev drush cr
  9. Install and set as default sellpahomes
  10. refresh homepage

The website encountered an unexpected error. Try again later.

Drupal\Core\Render\Component\Exception\InvalidComponentException: [site_logo] NULL value found, but a string or an object is required. This may be because the property is empty instead of having data present. If possible fix the source data, use the |default() twig filter, or update the schema to allow multiple types. in Drupal\Core\Theme\Component\ComponentValidator->validateProps() (line 203 of core/lib/Drupal/Core/Theme/Component/ComponentValidator.php).

Drupal\Core\Template\ComponentsTwigExtension->doValidateProps() (Line: 109) Drupal\Core\Template\ComponentsTwigExtension->validateProps() (Line: 43) TwigTemplate_4fa099cb89624c913dc248cd056a4677->doDisplay() (Line: 360) Twig\Template->yield() (Line: 158) TwigTemplate23589b6faa310c5c7c948fb6740f81cd1308022670->doDisplay() (Line: 360) Twig\Template->yield() (Line: 61) __TwigTemplate_23589b6faa310c5c7c948fb6740f81cd->doDisplay() (Line: 360) Twig\Template->yield() (Line: 335) Twig\Template->render() (Line: 38) Twig\TemplateWrapper->render() (Line: 33) twig_render_template() (Line: 348) Drupal\Core\Theme\ThemeManager->render() (Line: 491) Drupal\Core\Render\Renderer->doRender() (Line: 504) Drupal\Core\Render\Renderer->doRender() (Line: 248) Drupal\Core\Render\Renderer->render() (Line: 475) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 70) TwigTemplate_de8fcc98a8c7624419a824641b42beda->doDisplay() (Line: 360) Twig\Template->yield() (Line: 335) Twig\Template->render() (Line: 38) Twig\TemplateWrapper->render() (Line: 33) twig_render_template() (Line: 348) Drupal\Core\Theme\ThemeManager->render() (Line: 491) Drupal\Core\Render\Renderer->doRender() (Line: 248) Drupal\Core\Render\Renderer->render() (Line: 475) Drupal\Core\Template\TwigExtension->escapeFilter() (Line: 89) __TwigTemplate_b40e760ffb1a537c9d77f304995a7ebc->doDisplay() (Line: 360) Twig\Template->yield() (Line: 335) Twig\Template->render() (Line: 38) Twig\TemplateWrapper->render() (Line: 33) twig_render_template() (Line: 348) Drupal\Core\Theme\ThemeManager->render() (Line: 491) Drupal\Core\Render\Renderer->doRender() (Line: 248) Drupal\Core\Render\Renderer->render() (Line: 158) Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent{closure}() (Line: 638) 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: 53) Drupal\Core\StackMiddleware\Session->handle() (Line: 48) Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28) Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 50) Drupal\ban\BanMiddleware->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: 741) Drupal\Core\DrupalKernel->handle() (Line: 19)

drupalninja commented 14 hours ago

Thanks for the context, I will look into this