- Issue created by @rraney
- πΊπΈUnited States rraney
Tab settings added, what would you like to see exactly?
- πΊπΈUnited States rraney
Is this the same problem I'm having?
https://www.drupal.org/project/views_bootstrap/issues/2948150 β¨ Views Bootstrap Tabs cannot be grouped RTBCMy production site currently works. We are using 5.5.0-alpha1 with Drupal 10.2.5. We have a patch "installed" using composer from the issue above.
"drupal/views_bootstrap": {
"2948150: Views Bootstrap Tabs cannot be grouped" : " https://www.drupal.org/files/issues/2024-03-19/views-rows-content-groupe... β "
}When I updated to 10.3.1, it wouldn't let me keep this patch. I'm wondering if this patch is necessary in order for tabs to be "grouped" or aggregated. Also, why is composer saying it cannot install the patch?
- Status changed to Closed: works as designed
5 months ago 10:34pm 1 August 2024 - πΊπΈUnited States shelane
That patch has already been applied and released in the beta1 release. Please update to the recently released 5.5.0-rc1
- Status changed to Active
5 months ago 12:40pm 2 August 2024 - πΊπΈUnited States rraney
I started out using the "beta" version of this module, then I switched back to alpha hoping it might work. I just ran this command:
composer require 'drupal/views_bootstrap:^5.5@beta'I cleared cache, and the problem still exists. If you don't think it's a bug, then we can change to support request.
Currently I'm running Drupal 10.3.1, PHP 8.1.x and this Version: 5.5.0-rc1, which was installed when I chose beta.
- πΊπΈUnited States rraney
I'm attaching a screenshot of what I see in the View
- πΊπΈUnited States rraney
This patch has a line that's added https://www.drupal.org/files/issues/2022-06-10/views-rows-content-grouped-by-tab-field-2948150-40.patch β
like this, "+ $form['tab_group'] = [
+ '#type' => 'checkbox',
+ '#title' => $this->t('Group by tab field'),
+ '#default_value' => $this->options['tab_group'],
+ '#description' => $this->t('If you want to group tabs by same values.'),
+ ];"I cannot find this in the code here: /src/Plugin/views/style/ViewsBootstrapTab.php (which is installed in beta)
- πΊπΈUnited States rraney
I'm tempted to learn how to create my own patch, based on the old ones, because I need this to be working and the old patches don't work. Any suggestions appreciated!
- πΊπΈUnited States rraney
The toggle "Group by tab field" is missing in the View form. I manually added it, however when I toggle to turn it "on", it does nothing. I'll have to look more closely at the code, but I think the update to the module is missing the form field and maybe something to make it work.
- πΊπΈUnited States rraney
In the theme.inc file, there is no
$vars['tab_group'] = $view->style_plugin->options['tab_group'];
I could go on and on, but it seems obvious this grouping code was not added to the version that was recommended to me. - πΊπΈUnited States rraney
Honestly, I think the template needs work. I could maybe try to help but there is no sign of a
- .
https://getbootstrap.com/docs/5.2/components/navs-tabs/I think the patches addressed this possibly. I got the grouping to work, but there it's not rendering right at all. There's not content showing because there are no list items.
- πΊπΈUnited States rraney
I believe I got it working locally. I'm not confident in how to make a patch. I basically worked around the existing code and used this patch to guide me. https://www.drupal.org/files/issues/2024-03-19/views-rows-content-grouped-by-tab-field-2948150-49.patch β
Please let me know if there are plans to add the grouping code to the module, so I can do this the right way (the Drupal way).
- πΊπΈUnited States shelane
OK, so I followed commits made since that date. I removed that particular code in favor of using views grouping. I let views do the grouping logic rather than calculating it myself. Given that the module version was in alpha state at the time to allow for major changes, it comes with a bit of buyer beware when using an alpha version.
As I said though, grouping is available, so let's walk through that.
The view is set using fields and set to format as Bootstrap Tabs:
The Bootstrap Tab settings select the field to use for grouping. In this test case, it's a taxonomy term value:
Then the group field is displayed above the tabs that are grouped under that field:
In your settings screenshot, that group field is not there and I'm not sure why. If you are still having difficulty, please reach out to me on Drupal Slack (shelane).
- πΊπΈUnited States rraney
Have you tested assigning the same grouping value to multiple pieces of content? I can't tell from the screenshot. All I know is I did everything you are showing and it didn't group. I selected a value to group by - shown in your second screenshot.
- πΊπΈUnited States rraney
If anyone could supply a patch for this version of the module, I'd appreciate it. I basically want the old version of the module that worked for me with the patch that supported grouping in tabs.
- π¦πΊAustralia noonoos
Same issue here
Drupal Version 10.3.2
PHP 8.2
Views Bootstrap 5.5.0-rc1 - πΊπΈUnited States shelane
As per the related issue, I switched the type to feature request.
- πΊπΈUnited States rraney
Can you please share what I'm supposed to do if I would like to use the new merge request? Will it be part of an upcoming official release?
- πΊπΈUnited States shelane
It will be part of an upcoming release. I have a few other tasks to finish before I make that release. You can use the dev version that includes the updates if you'd like.
composer require 'drupal/views_bootstrap:5.5.x-dev@dev'
Automatically closed - issue fixed for 2 weeks with no activity.
- Status changed to Fixed
about 8 hours ago 3:16pm 18 December 2024 - πΊπΈUnited States rraney
I have the dev. version installed locally and I'm not getting the grouping option. I'll upload screenshots.
- πΊπΈUnited States rraney
I just realized there is a dropdown where you have to select to group, so I guess the dev. version DOES work. Please let me know when this will be released.