Problem/Motivation

Receiving a undefined variable notice with the following output when going to set the settings fpr the theme:

Notice: Undefined variable: javascript in include_once() (line 143 of themes/contrib/bfd/bootstrap_for_drupal.theme).

include_once('/home/sites/sitename/public_html/themes/contrib/bfd/bootstrap_for_drupal.theme') (Line: 147)
Drupal\Core\Extension\Extension->load() (Line: 36)
twig_init(Object)
call_user_func('twig_init', Object) (Line: 146)
Drupal\Core\Theme\ThemeInitialization->loadActiveTheme(Object) (Line: 122)
Drupal\Core\Theme\ThemeManager->setActiveTheme(Object) (Line: 349)
Drupal\system\Form\ThemeSettingsForm->buildForm(Array, Object, 'bootstrap_for_drupal')
call_user_func_array(Array, Array) (Line: 532)
Drupal\Core\Form\FormBuilder->retrieveForm('system_theme_settings', Object) (Line: 278)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 73)
Drupal\Core\Controller\FormController->getContentResult(Object, Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 573)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 80)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 52)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 706)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Install on fresh Drupal 9.1.4

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Christopher Riley created an issue. See original summary.

Nick Bell’s picture

If you just comment out the last three lines of themes/contrib/bfd/bootstrap_for_drupal.theme the problem goes away. Looks like some kind of hard-wired debug code that didn't get stripped out referring to a site ms8.bfd.dev which doesn't exist.

if (\Drupal::service('router.admin_context')->isAdminRoute()) {
   unset($javascript['/sites/ms8.bfd.dev/themes/contrib/bfd/assets/js/popperrr.min.js']);
}
OCTOGONE.dev’s picture

thx, i'll correct this asap

unsettlingtrend’s picture

Adding patch to remove that code.

OCTOGONE.dev’s picture

Status: Active » Fixed

added to the release 8.x-2.65

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.