Shadowbox gallery displays only the first image on a multi-image field (option "compact")

In 7.x-3.0-beta5 version a new compact parameter has been added to the shadowbox formatter. So if you have an image field (multimage, accepts more than 1 image) and you set its formatter as shadowbox with gallery type and compact checked, you will get a gallery in which only the first image thumbnail is displayed and when you click on it shadowbox is opened and you can view all the images there.

However, this function apparently does not work properly. Yes, only the first image thumbnail is shown, but when you click you can only see the first image in the shadowbox gallery. The cause is apparently a bug in the shadowbox module.

The problem is very easily fixed by editing one line of the file shadowbox.module

diff --git a/shadowbox.module b/shadowbox.module
index 9531a81..3b05b1d 100644
--- a/shadowbox.module
+++ b/shadowbox.module
@@ -555,5 +555,5 @@ function theme_shadowbox_formatter($variables) {

$wrapper_classes = ($gallery_id != '') ? "sb-image sb-gallery sb-gallery-$gallery_id" : 'sb-image sb-individual';

- return '' . $output . '';
+ return '' . $output . '';


Drupal themes to be compared