Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I get the following error when making Bootstrap my default theme:
The website encountered an unexpected error. Please try again later.
Error: Class 'Drupal\bootstrap\Utility\Attributes' not found in Drupal\bootstrap\Utility\DrupalAttributes->getAttributes()
Error: Class 'Drupal\bootstrap\Utility\Attributes' not found in Drupal\bootstrap\Utility\DrupalAttributes->getAttributes() (line 184 of /home/xxxxxx/public_html/drupal8/themes/bootstrap/src/Utility/DrupalAttributes.php) #0 /home/xxxxxx/public_html/drupal8/themes/bootstrap/src/Utility/DrupalAttributes.php(244): Drupal\bootstrap\Utility\DrupalAttributes->getAttributes('attributes') #1 /home/xxxxxx/public_html/drupal8/themes/bootstrap/src/Plugin/Preprocess/Links.php(26): Drupal\bootstrap\Utility\DrupalAttributes->hasClass('operations') #2 /home/xxxxxx/public_html/drupal8/themes/bootstrap/src/Plugin/Preprocess/PreprocessBase.php(57): Drupal\bootstrap\Plugin\Preprocess\Links->preprocessVariables(Object(Drupal\bootstrap\Utility\Variables)) #3 /home/xxxxxx/public_html/drupal8/themes/bootstrap/src/Bootstrap.php(1141): Drupal\bootstrap\Plugin\Preprocess\PreprocessBase->preprocess(Array, 'links', Array) #4 /home/xxxxxx/public_html/drupal8/themes/bootstrap/bootstrap.theme(117): Drupal\bootstrap\Bootstrap::preprocess(Array, 'links', Array) #5 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Theme/ThemeManager.php(287): bootstrap_preprocess(Array, 'links', Array) #6 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('links', Array) #7 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #8 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #9 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Template/TwigExtension.php(490): Drupal\Core\Render\Renderer->render(Array) #10 /home/xxxxxx/public_html/drupal8/sites/default/files/php/twig/59e2582f1a90a_views-view.html.twig_cxxwyGZqX9jzCzwg-6NflpAXR/IRXZXI7-1nhsKWe8RrnqOwuye1YumYSnpFiGl8EMF_M.php(124): Drupal\Core\Template\TwigExtension->escapeFilter(Object(Drupal\Core\Template\TwigEnvironment), Array, 'html', NULL, true) #11 /home/xxxxxx/public_html/drupal8/vendor/twig/twig/lib/Twig/Template.php(432): __TwigTemplate_0eb995759ebbdf2d191dc6cf3525b89f6544979d54400add2dacfbf6b43022a1->doDisplay(Array, Array) #12 /home/xxxxxx/public_html/drupal8/vendor/twig/twig/lib/Twig/Template.php(403): Twig_Template->displayWithErrorHandling(Array, Array) #13 /home/xxxxxx/public_html/drupal8/vendor/twig/twig/lib/Twig/Template.php(411): Twig_Template->display(Array) #14 /home/xxxxxx/public_html/drupal8/core/themes/engines/twig/twig.engine(64): Twig_Template->render(Array) #15 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Theme/ThemeManager.php(384): twig_render_template('themes/bootstra...', Array) #16 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(437): Drupal\Core\Theme\ThemeManager->render('views_view', Array) #17 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(450): Drupal\Core\Render\Renderer->doRender(Array) #18 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(195): Drupal\Core\Render\Renderer->doRender(Array, false) #19 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(226): Drupal\Core\Render\Renderer->render(Array, false) #20 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/Renderer.php(576): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() #21 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(227): Drupal\Core\Render\Renderer->executeInRenderContext(Object(Drupal\Core\Render\RenderContext), Object(Closure)) #22 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(117): Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #23 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object(Symfony\Component\HttpFoundation\Request), Object(Drupal\Core\Routing\CurrentRouteMatch)) #24 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(108): Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent), 'kernel.view', Object(Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher)) #25 /home/xxxxxx/public_html/drupal8/vendor/symfony/http-kernel/HttpKernel.php(158): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object(Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent)) #26 /home/xxxxxx/public_html/drupal8/vendor/symfony/http-kernel/HttpKernel.php(68): Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object(Symfony\Component\HttpFoundation\Request), 1) #27 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/StackMiddleware/Session.php(57): Symfony\Component\HttpKernel\HttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #28 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(47): Drupal\Core\StackMiddleware\Session->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #29 /home/xxxxxx/public_html/drupal8/core/modules/page_cache/src/StackMiddleware/PageCache.php(99): Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #30 /home/xxxxxx/public_html/drupal8/core/modules/page_cache/src/StackMiddleware/PageCache.php(78): Drupal\page_cache\StackMiddleware\PageCache->pass(Object(Symfony\Component\HttpFoundation\Request), 1, true) #31 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(47): Drupal\page_cache\StackMiddleware\PageCache->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #32 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(50): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #33 /home/xxxxxx/public_html/drupal8/vendor/stack/builder/src/Stack/StackedHttpKernel.php(23): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #34 /home/xxxxxx/public_html/drupal8/core/lib/Drupal/Core/DrupalKernel.php(657): Stack\StackedHttpKernel->handle(Object(Symfony\Component\HttpFoundation\Request), 1, true) #35 /home/xxxxxx/public_html/drupal8/index.php(19): Drupal\Core\DrupalKernel->handle(Object(Symfony\Component\HttpFoundation\Request)) #36 {main}.
Comments
Comment #2
Back From 7 CreditAttribution: Back From 7 commentedComment #3
markhalliwellFrom the error above, the other autoloaded src files in this theme are being invoked, so clearly there is something unique with your particular setup that is causing this (perhaps the file is missing or doesn't have the proper permissions to be read by the web server). I am unable to reproduce this.
Comment #4
Back From 7 CreditAttribution: Back From 7 commentedThe weird thing is when I use scriptilicious Drupal 8 installs fine. I have always been weary about using a script loader like that.. I've always installed Drupal manually...