Once the module is activated, The next message is printed in all pages:
Error: Call to a member function removeClass() on array in toolbar_anti_flicker_preprocess_html() (line 47 of modules/contrib/toolbar_anti_flicker/toolbar_anti_flicker.module).
toolbar_anti_flicker_preprocess_html(Array, 'html', Array) (Line: 287)
Drupal\Core\Theme\ThemeManager->render('html', Array) (Line: 437)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array) (Line: 147)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 582)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 148)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 156)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 67)
Drupal\simple_oauth\HttpMiddleware\BasicAuthSwap->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: 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: 693)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
I get the module via composer.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | call_member_function_removeClass-3058197-5.patch | 913 bytes | julianvj |
Comments
Comment #2
dogamboar commentedComment #3
droplet commentedWhat's your Drupal version and theme
Comment #4
dogamboar commentedDrupal version 8.7.2
Theme Radix 8.x-3.1
Comment #5
julianvj commentedThis issue is related to this one from core toolbar_preprocess_html() converts attributes from array to Attribute object
I think that instead of checking Drupal version number you can check if ['attributes']['class'] is an array
Patch attached with this approach.
Comment #6
droplet commentedhttps://www.drupal.org/project/drupal/issues/2917653#comment-12490326
https://www.drupal.org/project/drupal/issues/2917653#comment-12527156
Both are a valid code.
It's going to remove the class, we need to enhance it.
Comment #8
droplet commented