Item Carousel Not Picking up non-primary Media

Hello

I am using Item Caroussel Block to display a carousel, but I am having a hard time to display other media related to an item.
So for example on this page: https://ibali.uct.ac.za/s/pg-medicinechest/page/landing-page I am showcasing a number of items, one of them being a chest that has more than one media attached. However, no matter what media I select to display, the carousel always shows the primary media of that item (https://ibali.uct.ac.za/s/pg-medicinechest/item/18194:

I can see that in the page edit the right attachment is selected, but this doesn’t seem to show up on the generation of the page?

Any assistance would be appreciated?

It looks like that’s just a bug in the Item Carousel Block module.

1 Like

Sorry about that, it was indeed a bug in the module–but it was a quick fix!

I’ve updated the Item Carousel Block module’s repo with the correct code. If you installed the module via git on the command line, you just need to git pull from within the module directory to update with the fix.

If you installed the module by downloading a zip package, we’ll include this fix on the next release. In the meantime, you can fix the issue in your own code by making the change shown in the commit: https://github.com/omeka-s-modules/ItemCarouselBlock/commit/7e11ffe092d62836b524fcbabec0cc0726f7d7aa

…basically, replacing $item with $media on line 37 of view/common/block-layout/item-carousel.phtml.

Please let me know if this fix resolves the issue!

1 Like

Dear Matthew,

Thanks so much, that has indeed resolved the issue. I replaced the two variables on line 37.
Very appreciative!

Sanjin