Images not changing

Created on 29 July 2021, over 3 years ago
Updated 19 February 2024, 10 months ago

Problem/Motivation

The images are not changing. The slides are not sliding.

I'm using locally

  • a custom subtheme of Bootstrap Barrio 5.5.2
  • Drupal 9.2.1
  • Apache/2.4.46 (Unix)
  • PHP 7.4.16 Memory limit 128M
  • MySQL 5.7.32
  • MAMP Pro (locally)
  • Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-80-generic x86_64) (remotely on a Digital Ocean droplet)

and remotely on a Digital Ocean droplet

  • a custom subtheme of Bootstrap Barrio 5.5.2
  • Drupal 9.2.1
  • Apache/2.4.41 (Unix)
  • PHP 7.4.3 Memory limit 256M
  • MySQL 8.0.26-0ubuntu0.20.04.2
  • Ubuntu 20.04.2 LTS (GNU/Linux 5.4.0-80-generic x86_64)

I'm pointing the subtheme to a local copy of the Bootstrap library.

Configuration:
intervals: 2000
wrap selected
Boot strap image type: Image Fluid
Image style: slideshow ( a custom style, dimensions 780 x 260)

I've tried selecting and deselecting Assets. No difference.

The images are *.png

According to https://getbootstrap.com/docs/5.0/components/carousel/
the carousel div with the carousel class should have a property called data-bs-ride.
And the img should have a d-block class and w-100 class.
I don't see these with the Bootstrap Simple Carousel.

What am I missing?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.65

Component

User interface

Created by

πŸ‡ΊπŸ‡ΈUnited States TomSherlock

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • I think the problem here is simply that the settings form does not clear the cache.
    When the block is built it should declare it's dependency on the block settings.
    So in a module hook it can be done like this.

    /**
     * Implements hook_block_view_BASE_BLOCK_ID_alter()
     */
    function my_module_block_view_bootstrap_simple_carousel_block_alter(array &$build, \Drupal\Core\Block\BlockPluginInterface $block) {
      $build['#cache'] = [
        'tags' => $build['#block']->getCacheTags(),
      ];
    }

    but better still, in this module's block plugin Drupal\bootstrap_simple_carousel\Plugin\Block\CarouselBlock::build() should just include this:

        $build = [
          '#items' => $this->getCarouselItems(),
          '#settings' => $this->moduleSettings,
          '#theme' => 'bootstrap_simple_carousel_block',
          '#cache' => [
            'tags' => $this->moduleSettings->getCacheTags(),
          ],
        ];
  • And here's a patch for that

    • af186a76 committed on 8.x-1.x
      Issue: #3225942, patch #6 by matslats
      
  • πŸ‡§πŸ‡ΎBelarus asmdk

    Thanks @matslats, your fix was applied in version 8x-1.65 and will move on new ones.

  • Status changed to Fixed 10 months ago
  • πŸ‡§πŸ‡ΎBelarus asmdk
  • Assigned to asmdk
  • Status changed to Fixed 10 months ago
  • πŸ‡§πŸ‡ΎBelarus asmdk
Production build 0.71.5 2024