I configured an unlimited image filed the formatter as follows: Show gallery on field in compact mode.
In the frontend I found out that the first image was shown but the rest wasn't. I did some digging and found this line in theme_shadowbox_formatter

 return '<div class="' . $wrapper_classes . '"' . (( $variables['itemid'] == 0 || (isset($variables['compact']) && !$variables['compact']) ) ? '' : 'style="display:none;' ) . '>' . $output . '</div>';

Note the missing " behind display:none;

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Honestly Illustrated’s picture

Priority: Critical » Normal

Confirmed: Line 558

plusproduit’s picture

Thanks

Bathie’s picture

Add a patch to fix Field Formatter Gallery Compact missing.

Selfirian’s picture

Hi, this didn't work for me I had to change the patch a bit in order to have it working, it's a small css thing but it's the first time I find an error I actually could fix myself :) The " comes after none;

diff --git a/shadowbox.module b/shadowbox.module
index 9531a81..6654e8f 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 '<div class="' . $wrapper_classes . '"' . (( $variables['itemid'] == 0 || (isset($variables['compact']) && !$variables['compact']) ) ? '' : 'style="display:none;' ) . '>' . $output . '</div>';
+ return '<div class="' . $wrapper_classes . '"' . (( $variables['itemid'] == 0 || (isset($variables['compact']) && !$variables['compact']) ) ? '' : 'style="display:none;"' ) . '>' . $output . '</div>';
 }
Bathie’s picture

Hi, I updated the patch to fix Field Formatter Gallery Compact missing for 7.x-3.x.

carstenG’s picture

Status: Active » Needs review
kiralyj’s picture

#5 patch is good, thanks!

carstenG’s picture

Status: Needs review » Reviewed & tested by the community