Hello,

with the latest dev version I have this issue in the userprofile when I had uploaded a picture:

otice: Undefined index: class in galleryformatter_field_formatter_view() (line 271 of /.../sites/all/modules/galleryformatter/galleryformatter.module).

The slideshow is broken too.. With older version this works.

Best regards
Frank

Comments

fasdalf@fasdalf.ru’s picture

Status: Active » Needs review

I hacked a galleryformatter.module.
before:

      if ($settings['linking_method'] !== 'onclick_full') {
        $link_attributes['class'] = 'shownext';
      }

      // integration with other modules for jQuery modal windows
      switch($settings['modal']) {
        case 'none':
          break;
        case 'colorbox':
          $link_attributes['class'] .= ($settings['linking_method'] == 'onclick_full') ? ' colorbox' : 'colorbox';
          $link_attributes['rel'] = 'gallery-['. $slideset_id .']';
          break;
        case 'shadowbox':
          $link_attributes['rel'] = 'shadowbox['.$slideset_id .']';
          $element['#attached']['library'][] = array('shadowbox', 'shadowbox');
          break;
        case 'lightbox2':
          $link_attributes['rel'] = 'lightbox['. $slideset_id .']';
          break;
      }

After (changes are bolded):

if ($settings['linking_method'] !== 'onclick_full') {
$link_attributes['class'] = 'shownext';
} else {
$link_attributes['class'] = '';
}

// integration with other modules for jQuery modal windows
switch($settings['modal']) {
case 'none':
break;
case 'colorbox':
$link_attributes['class'] .= ($settings['linking_method'] !== 'onclick_full') ? ' colorbox' : 'colorbox';
$link_attributes['rel'] = 'gallery-['. $slideset_id .']';
break;
case 'shadowbox':
$link_attributes['rel'] = 'shadowbox['.$slideset_id .']';
$element['#attached']['library'][] = array('shadowbox', 'shadowbox');
break;
case 'lightbox2':
$link_attributes['rel'] = 'lightbox['. $slideset_id .']';
break;
}

That's how we use it now.

franzkewd’s picture

#1 fixed mine. Thanks fasdalf.

fraweg’s picture

Hello,

Tanks! #1 fixes for me too...

Best regards
Frank

Edit: But there is still no slideshow when I clicked on a picture. Only the picture is shown with JQuery. Mabybe for this issue I should make a new thread.
Now the problem is linked here "http://drupal.org/node/1563916"

Manuel Garcia’s picture

Status: Needs review » Fixed

Thanks for the report guys, I've committed a fix for this and other notices that might come up during the upgrade.
http://drupalcode.org/project/galleryformatter.git/commit/a5cc969

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.