Problem/Motivation
The initial configuration is the following:
- Drupal 8.6.7
- Theme is bootstrap_barrio 8.x-4.17 located in the /themes/contrib folder
- Subtheme is bootstrap_sass 8.x-1.7 located in the /themes/custom folder
- Subtheme is renamed and configured. Typing
gulpin the /themes/custom/mythemename folder gracefully launches Gulp 4 - 9 modules are enabled and configured:
- Admin Toolbar 8.x-1.26
- Block Class 8.x-1.0
- Chaos Tool Suite (ctools) 8.x-3.0
- Field Formatter Class 8.x-1.1
- Honeypot 8.x-1.29
- Pathauto 8.x-1.3
- Redirect 8.x-1.3
- Token 8.x-1.5
- Webform 8.x-5.1
Typingcomposer updategenerates three updates:
Updating drupal/core (8.6.7 => 8.6.8): Loading from cacheUpdating drupal/bootstrap_barrio (4.17.0 => 4.18.0): Loading from cacheUpdating webflo/drupal-core-require-dev (8.6.7 => 8.6.8)
Typingdrush updbgenerates multiple errors titled:
[warning] Class Drupal\Core\Extension\Extension has no unserializer DatabaseBackend.php:167
Typingdrush crfixes the problem related to the update to Drupal 8.6.8 as described in this issue.
Typingsudo service apache2 restartto restart Apache.
The website is up and running with zero error in the status report until visiting the Barrio theme settings at /admin/appearance/settings/bootstrap_barrio which generates a blank page with the following text: "The website encountered an unexpected error. Please try again later."
Visiting the log message shows the following error:
ParseError: syntax error, unexpected '=>' (T_DOUBLE_ARROW) in Drupal\system\Form\ThemeSettingsForm->buildForm() (line 45 of /var/www/html/drupal/web/themes/contrib/bootstrap_barrio/theme-settings.php) #0 [internal function]: Drupal\system\Form\ThemeSettingsForm->buildForm(Array, Object(Drupal\Core\Form\FormState), 'bootstrap_barri...') #1 /var/www/html/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(518): call_user_func_array(Array, Array) #2 /var/www/html/drupal/web/core/lib/Drupal/Core/Form/FormBuilder.php(275): Drupal\Core\Form\FormBuilder->retrieveForm('system_theme_se...', Object(Drupal\Core\Form\FormState)) #3 /var/www/html/drupal/web/core/lib/Drupal/Core/Controller/FormController.php(93): Drupal\Core\Form\FormBuilder->buildForm('system_theme_se...', Object(Drupal\Core\Form\FormState)) #4 [internal function]: Drupal\Core\Controller\FormController->getContentResult(Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\RouteMatch)) #5 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array(Array, Array) #6 /var/www/html/drupal/web/core/lib/Drupal/Core/Render/Renderer.php(582): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #7 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(124): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #8 /var/www/html/drupal/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) #9 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(151): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() #10 /var/www/html/drupal/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #11 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #12 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #13 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #14 /var/www/html/drupal/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #15 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #16 /var/www/html/drupal/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(52): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #17 /var/www/html/drupal/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #18 /var/www/html/drupal/web/core/lib/Drupal/Core/DrupalKernel.php(693): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #19 /var/www/html/drupal/web/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #20 {main}.
Visiting the subtheme settings at /admin/appearance/settings/mythemename also generates a blank page with exactly the same error in the log messages.
Proposed resolution
None
The problem is hopefully related to the latest Drupal 8.6.8 version which generates an issue mentioned above.
Comments
Comment #2
montesajudy commentedI am also current facing this issue. Any fix for this?
Comment #3
gillesbailleux@Judy: did you also upgrade Drupal core to version 8.6.8?
Comment #4
thetailwind commentedI actually have a fix for this, but I do not know how to submit a patch. It looks like there may have been some syntactical errors that were saved to the master branch. Disclosure, I am very new to this, but I got past this error. On several lines, there seemed to be out of place brackets, and one instance of a comma that should have been a ";".
If you have a 100% fresh theme-settings.php, overwrite it with the following:
Comment #5
montesajudy commented@gillesbailleux yes, I updated to Bootstrap Barrio 8.x-4.18 and Drupal 8.6.8 then the issue suddenly occured.
Comment #6
gillesbailleux@thetailwind: thank you for your contribution
@Alberto Siles: looking at the diffs between versions 8.x-4.17 & 8.x-4.18, the problem is in all likelihood located between lines 32 to 47 of the theme-settings.php file
theme-settings.php file for version 8.x-4.17
theme-settings.php file for version 8.x-4.18
Comment #7
thetailwind commented@gillesbailleux that's not all,
On these lines there seems to be errors:
45 extra set of parens within array (see crossed out text)
[
('@bootstrap_library_link' => Drupal::l('Bootstrap Library Settings' , Url::fromRoute('bootstrap_library.admin')))]),99 closing ) without opening, i removed it
252 unexpected comma should be ;
305 opening ( without close, i removed it
605 opening ( without close, i removed it
610 opening ( without close, i removed it
Comment #8
gillesbailleux@thetailwind: thank you once again
@Alberto Siles: thank you for the release of bootstrap_barrio 8.x-4.19!
Comment #9
hatuhay commentedNew version 8.x-4.19 just launched, but not sure if issues are related.
Please confirm if this is still happening
Comment #10
gillesbailleuxThank you Alberto for this release which fixes this issue.
Comment #11
gillesbailleuxA feedback from @thetailwind and @montesajudy is more than welcome, so Alberto can close this issue.
Comment #12
montesajudy commented@gillesbailleux upgrading to bootstrap_barrio 8.x-4.19 using Drupal 8.6.8 seems to fix the issue for me. The subtheme and basetheme settings page are now loading correctly.
Comment #13
gillesbailleux@montesajudy: glad to read that the theme update works for you too.