- Issue created by @rraney
- πΊπΈUnited States rraney
I added a related issue. It seems I was advised to use the dev. version. The issue I've shared was supposed to be resolved. It may have been but I'm unable to access Settings for Bootstrap Tabs in this version (apparently it's dev).
- πΊπΈUnited States shelane
I am able to see the settings form both when editing an existing view and creating a new view.
- πΊπΈUnited States rraney
Which version should I be using in order to get the functionality in the related issue?
- πΊπΈUnited States rraney
I corrected the Drupal version to 10.3.10.
Here is the Backtrace from an error
TypeError: Drupal\Core\Cache\CacheableMetadata::createFromRenderArray(): Argument #1 ($build) must be of type array, null given, called in /app/web/modules/contrib/viewsreference/src/Plugin/Field/FieldFormatter/ViewsReferenceFieldFormatter.php on line 165 in Drupal\Core\Cache\CacheableMetadata::createFromRenderArray() (line 149 of /app/web/core/lib/Drupal/Core/Cache/CacheableMetadata.php).
#0 /app/web/modules/contrib/viewsreference/src/Plugin/Field/FieldFormatter/ViewsReferenceFieldFormatter.php(165): Drupal\Core\Cache\CacheableMetadata::createFromRenderArray()
#1 /app/web/core/lib/Drupal/Core/Field/FormatterBase.php(91): Drupal\viewsreference\Plugin\Field\FieldFormatter\ViewsReferenceFieldFormatter->viewElements()
#2 /app/web/core/lib/Drupal/Core/Entity/Entity/EntityViewDisplay.php(268): Drupal\Core\Field\FormatterBase->view()
#3 /app/web/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php(282): Drupal\Core\Entity\Entity\EntityViewDisplay->buildMultiple()
#4 /app/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(340): Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay->buildMultiple()
#5 /app/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(282): Drupal\Core\Entity\EntityViewBuilder->buildComponents()
#6 /app/web/modules/contrib/paragraphs/src/ParagraphViewBuilder.php(19): Drupal\Core\Entity\EntityViewBuilder->buildMultiple()
#7 /app/web/core/lib/Drupal/Core/Entity/EntityViewBuilder.php(239): Drupal\paragraphs\ParagraphViewBuilder->buildMultiple()
#8 [internal function]: Drupal\Core\Entity\EntityViewBuilder->build()
#9 /app/web/core/lib/Drupal/Core/Security/DoTrustedCallbackTrait.php(113): call_user_func_array()
#10 /app/web/core/lib/Drupal/Core/Render/Renderer.php(870): Drupal\Core\Render\Renderer->doTrustedCallback()
#11 /app/web/core/lib/Drupal/Core/Render/Renderer.php(432): Drupal\Core\Render\Renderer->doCallback()
#12 /app/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender()
#13 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#14 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render()
#15 /app/web/sites/default/files/php/twig/675ca5b60d0c5_bootstrap-columns-2.html._rLtqgDQWh_BfgfmV3oknlQNTs/qiPqTkk_NA5fkVNZ2q-9OQ2Hh5nrR0-NrgWCsjLyA1w.php(71): Drupal\Core\Template\TwigExtension->escapeFilter()
#16 /app/vendor/twig/twig/src/Template.php(393): __TwigTemplate_f7b3c47eb2d3fd5a36d693fee41afb15->doDisplay()
#17 /app/vendor/twig/twig/src/Template.php(349): Twig\Template->yield()
#18 /app/vendor/twig/twig/src/Template.php(364): Twig\Template->display()
#19 /app/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render()
#20 /app/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render()
#21 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#22 /app/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render()
#23 /app/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender()
#24 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#25 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render()
#26 /app/web/sites/default/files/php/twig/675ca5b60d0c5_paragraph--mbp-layout.htm_9QWw_u5V_OP1SvySuCq8rC89g/RpSUElcYpBpLWonnnjln_Z48uKZ8FXCpeQR0YcNrkzk.php(97): Drupal\Core\Template\TwigExtension->escapeFilter()
#27 /app/vendor/twig/twig/src/Template.php(437): __TwigTemplate_b68d5bdc73e23b3b601d345f37639ad8->block_content()
#28 /app/web/sites/default/files/php/twig/675ca5b60d0c5_paragraph--mbp-layout.htm_9QWw_u5V_OP1SvySuCq8rC89g/RpSUElcYpBpLWonnnjln_Z48uKZ8FXCpeQR0YcNrkzk.php(80): Twig\Template->yieldBlock()
#29 /app/vendor/twig/twig/src/Template.php(437): __TwigTemplate_b68d5bdc73e23b3b601d345f37639ad8->block_paragraph()
#30 /app/web/sites/default/files/php/twig/675ca5b60d0c5_paragraph--mbp-layout.htm_9QWw_u5V_OP1SvySuCq8rC89g/RpSUElcYpBpLWonnnjln_Z48uKZ8FXCpeQR0YcNrkzk.php(51): Twig\Template->yieldBlock()
#31 /app/vendor/twig/twig/src/Template.php(393): __TwigTemplate_b68d5bdc73e23b3b601d345f37639ad8->doDisplay()
#32 /app/vendor/twig/twig/src/Template.php(349): Twig\Template->yield()
#33 /app/vendor/twig/twig/src/Template.php(364): Twig\Template->display()
#34 /app/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render()
#35 /app/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render()
#36 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#37 /app/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render()
#38 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#39 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render()
#40 /app/web/sites/default/files/php/twig/675ca5b60d0c5_field.html.twig_Zu2PxDrCRklxz1XOlrxTqfXA_/7VTjMeS8Fn28on20voWgc8ELROj15vigmV6xnPj_cRw.php(72): Drupal\Core\Template\TwigExtension->escapeFilter()
#41 /app/vendor/twig/twig/src/Template.php(393): __TwigTemplate_461cae6846b1c62afeb9e51b1d7a31c6->doDisplay()
#42 /app/vendor/twig/twig/src/Template.php(349): Twig\Template->yield()
#43 /app/vendor/twig/twig/src/Template.php(364): Twig\Template->display()
#44 /app/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render()
#45 /app/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render()
#46 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#47 /app/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render()
#48 /app/web/core/lib/Drupal/Core/Render/Renderer.php(504): Drupal\Core\Render\Renderer->doRender()
#49 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#50 /app/web/core/lib/Drupal/Core/Template/TwigExtension.php(484): Drupal\Core\Render\Renderer->render()
#51 /app/web/sites/default/files/php/twig/675ca5b60d0c5_node.html.twig_Ji9iOUzYeAsy0_AAJ2UqrO2GS/hIfLsAuSfHnhniH9Uqcp_2YHY3dG0edFoFCQfocaTik.php(112): Drupal\Core\Template\TwigExtension->escapeFilter()
#52 /app/vendor/twig/twig/src/Template.php(393): __TwigTemplate_64bb0a9ece40e4d9ca4347478fc83295->doDisplay()
#53 /app/vendor/twig/twig/src/Template.php(349): Twig\Template->yield()
#54 /app/vendor/twig/twig/src/Template.php(364): Twig\Template->display()
#55 /app/vendor/twig/twig/src/TemplateWrapper.php(35): Twig\Template->render()
#56 /app/web/core/themes/engines/twig/twig.engine(33): Twig\TemplateWrapper->render()
#57 /app/web/core/lib/Drupal/Core/Theme/ThemeManager.php(348): twig_render_template()
#58 /app/web/core/lib/Drupal/Core/Render/Renderer.php(491): Drupal\Core\Theme\ThemeManager->render()
#59 /app/web/core/lib/Drupal/Core/Render/Renderer.php(248): Drupal\Core\Render\Renderer->doRender()
#60 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(238): Drupal\Core\Render\Renderer->render()
#61 /app/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}()
#62 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(231): Drupal\Core\Render\Renderer->executeInRenderContext()
#63 /app/web/core/lib/Drupal/Core/Render/MainContent/HtmlRenderer.php(128): Drupal\Core\Render\MainContent\HtmlRenderer->prepare()
#64 /app/web/core/lib/Drupal/Core/EventSubscriber/MainContentViewSubscriber.php(90): Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse()
#65 [internal function]: Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray()
#66 /app/web/core/lib/Drupal/Component/EventDispatcher/ContainerAwareEventDispatcher.php(111): call_user_func()
#67 /app/vendor/symfony/http-kernel/HttpKernel.php(186): Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()
#68 /app/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#69 /app/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#70 /app/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#71 /app/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#72 /app/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#73 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#74 /app/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#75 /app/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\page_cache\StackMiddleware\PageCache->handle()
#76 /app/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#77 /app/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#78 /app/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#79 /app/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#80 /app/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#81 /app/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#82 {main} - πΊπΈUnited States shelane
I checked in the 5.5.0-rc3 release and the dev release (only one additional commit).
The stack trace doesn't say anything about the views bootstrap module. It looks like it has something to do with the Views Reference Field module.
- πΊπΈUnited States shelane
Also, what theme are you using? What version of Bootstrap are you using?
- πΊπΈUnited States rraney
Barrio Bootstrap 5 - 5.5.17
Bootstrap 5.1.3In order to get the tabs working how I need them to work with grouping, which release should I be using? I thought I would try an actual release if it's been resolved.
- πΊπΈUnited States rraney
I actually installed an older version of the module which was working for me. I'm still seeing the issue in my dev. environment so I imagine there is some sort of conflict. Can anyone think of a starting point for determining what might be causing a conflict, if that's what this is?
- πΊπΈUnited States rraney
I got a lot of Ajax errors while doing this last test. Is it possible this is an Ajax issue? Does the popup rely on Ajax?
POST https://www.dgcoks.gov/admin/structure/views/ajax/display/document_block... 500 (Internal Server Error)
An AJAX HTTP error occurred.\nHTTP Result Code: 500\nDebugging information follows.\nPath: /admin/structure/views/ajax/display/document_block_view/block_43/style\nStatusText: error\nResponseText: The website encountered an unexpected error. Try again later.TypeError: Cannot access offset of type string on string in Drupal\\views_bootstrap\\Plugin\\views\\style\\ViewsBootstrapAccordion->buildOptionsForm() (line 79 of modules/contrib/views_bootstrap/src/Plugin/views/style/ViewsBootstrapAccordion.php).
- πΊπΈUnited States rraney
I just installed the newest version of this module and I'm still having issues with getting to Accordion and Tabs settings.
- πΊπΈUnited States rraney
AI insights for this error in console:
Explanation
The error message indicates a problem within the Views Bootstrap module (specifically the ViewsBootstrapAccordion style) on your Drupal website. Let's break down the key parts:
TypeError: Cannot access offset of type string on string: This is the core issue. PHP is trying to treat a string like an array and access a specific element (offset) of it. Strings in PHP are not arrays; they are sequences of characters. This indicates a coding error within the ViewsBootstrapAccordion style plugin.
in Drupal\\views_bootstrap\\Plugin\\views\\style\\ViewsBootstrapAccordion->buildOptionsForm() (line 79 ...): This pinpoints the location of the error within the module's code. Line 79 of ViewsBootstrapAccordion.php contains the faulty code.
The website encountered an unexpected error. Try again later.: This is Drupal's generic error message, which is not helpful for debugging.
HTTP Result Code: 500: This is an Internal Server Error, meaning the server encountered a problem while processing the request. The specific problem is the PHP error mentioned above.
Path: /admin/structure/views/ajax/display/document_block_view/block_43/style_options: This is crucial. It shows the URL where the error occurred. This path suggests you were likely configuring a View, specifically a "document_block_view" (View ID) with block ID "43", and interacting with the style options for the Views Bootstrap Accordion style.
How to Fix It:Update Views Bootstrap: The most likely solution is that the module is outdated and contains a bug. Go to /admin/modules in your Drupal site, find the Views Bootstrap module, and check for updates. Update it to the latest stable version.
Check for Conflicting Modules: Other modules might interfere with Views Bootstrap. Try temporarily disabling other recently installed modules, especially those that modify Views or forms, to see if the problem resolves.
Examine the Code (Advanced): If updating and disabling modules don't work, you'll need to examine the code directly.
Find the file: Locate modules/contrib/views_bootstrap/src/Plugin/views/style/ViewsBootstrapAccordion.php on your server.
Inspect line 79: Carefully review line 79. You'll likely find a line of code that tries to access a specific part of a string using array-like syntax (e.g., $myString[0], $myString['key']).
Identify the variable: Determine which variable is causing the issue. The error message should provide hints.
Correct the code: Fix the code to treat the variable correctly as a string, possibly using string functions like strpos(), substr(), or explode() depending on what you intend to achieve. If you're unsure, consult the module's documentation or seek help in Drupal forums.
Clear caches: After making changes, clear all Drupal caches (both the page cache and the render cache).
Enable Debug Mode (if safe): If you have access to PHP's error logging, you may want to enable debugging in Drupal (or configure your webserver to show PHP errors) for more detailed error messages. Be extremely cautious when enabling debug mode on a production site as it can expose sensitive information.
Drupal Forums/Issue Queue: Search the Drupal.org project page for the Views Bootstrap module for similar issues or file a new bug report if you can't find a solution. Providing details from the error message and your setup will help others assist you.
Important Considerations:Backup: Before making any code changes, always create a backup of your website files and database.
Permissions: Ensure you have the necessary file permissions to edit the module files.
Testing: Test changes thoroughly on a development or staging environment before applying them to your production site.
By systematically working through these steps, you should be able to identify and resolve the error. The most likely solution, however, is to simply update the Views Bootstrap module. - πΊπΈUnited States rraney
I turned OFF advanced CSS and JS aggregation and now I can access settings for Accordion and Tabs in my local environment.
I absolutely have to have this turned on in production, however, because of caching issues with my CDN.
Any idea why there would be a conflict with the advagg module?
- πΊπΈUnited States rraney
OK just a little reset here.
Locally, this version didn't work for me: composer require drupal/views_bootstrap:5.5.x-dev#4c6057e3b8c47ea88d8fd0427141fbf1463b9ed8
I reinstalled the dev. version: composer require 'drupal/views_bootstrap:5.5.x-dev@dev'
Locally, I can see settings but as I stated, I turned off CSS aggregation. I turned ON CSS AdvAgg, cleared cache and I can still access settings, so maybe there isn't a conflict.
I am pushing out the module update again to staging to see if it's working there.
- πΊπΈUnited States rraney
I just realized that the dev. version doesn't have the grouping that I need, as I went through in the related issue. #3464548: Bootstrap Tabs not aggregating or grouping. There currently doesn't seem to be a way around this.
- πΊπΈUnited States rraney
This worked. All I needed to do was get the correct module installed. I couldn't tell which version it was because it doesn't tell me in Drupal. Sorry and thanks.