Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal error after saving theme settings. #364

Closed
msnassar opened this issue Dec 15, 2023 · 1 comment
Closed

Fatal error after saving theme settings. #364

msnassar opened this issue Dec 15, 2023 · 1 comment

Comments

@msnassar
Copy link
Contributor

After updating the theme to recent release. We encounter fatal error after saving the theme settings.
Steps to reproduce:

  • On the theme settings page, untick "Card image hidden on mobile".
  • When submitting the form, we encounter the following fatal error.
The website encountered an unexpected error. Please try again later.

TypeError: Drupal\oe_bootstrap_theme\BackwardCompatibility::getSetting(): Return value must be of type bool, int returned in Drupal\oe_bootstrap_theme\BackwardCompatibility::getSetting() (line 31 of themes/contrib/oe_bootstrap_theme/src/BackwardCompatibility.php).

oe_bootstrap_theme_form_system_theme_settings_alter() (Line: 378)
Drupal\system\Form\ThemeSettingsForm->buildForm()
call_user_func_array() (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 283)
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: 592)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
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: 48)
Drupal\ucpkn_core\StackMiddleware\RedirectMiddleware->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 704)
Drupal\Core\DrupalKernel->handle() (Line: 19)
@brummbar
Copy link
Contributor

@msnassar , your child theme should extend oe_bootstrap_theme settings schema, as it's done here:
https://github.com/openeuropa/oe_whitelabel/blob/1.x/config/schema/oe_whitelabel.schema.yml
I tried on oe_whitelabel and I cannot reproduce the bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants