Drupal 5.3 (2 standalone installations, one in addon domain).
Drupal Gallery 5.x-2.0
Gallery 2.2 (Multi site install)

Problem:
Drupal Gallery settings >> Gallery Image Assist (G2Image) settings:

Default Display Options = Thumbnails only
Default Action = Thumbnail with link to parent album

Before upgrading to Drupal Gallery 5.x-2.0 this worked fine for both my Drupal installations i.e. the thumbnails linked to the parent album. After upgrading to 5.x-2.0 the thumbnails in both installations now link to a full size image.

Not sure if something changed in my configuration or if this setting is not functioning correctly.

Comments

profix898’s picture

I will need to check this on a local install, but if 'Default Action' is set to 'Thumbnail with link to parent album' (or to anything but 'G2 Filter ID') G2Image inserts the required html into the node directly. In this case it shouldnt make any difference with the new module. Do you observe the behavior when inserting new images only or for existing ones as well?

jupiterchild’s picture

I'm wondering if this is a re-write rule problem.
Even before I upgraded to Gallery 5.x-2.0 I never did seem to get the re-write rules functioning correctly. There was never any reference to Gallery in ANY .htaccess file be it in the Gallery2 or Drupal folder (I use a Gallery2 multi site install OUTSIDE of Drupal and according to instructions in the Gallery2 Re-write rule plugin it is not possible to test the Apache re-write rules with a Gallery2 multi site install) but since everything seemed to work ok other than having to contend with 'index.php' e.g. http://www.example.com/cms/index.php/gallery/v/2007/2007-11/.... I never investigated further.

Meanwhile I will try your suggestions and test what happens with new Gallery2 albums/images and get back to you. I will also have another go at the re-write rule problem.

BTW thanks for a truly great module and very fast response!

jupiterchild’s picture

I now have the re-write rules working correctly for both of my Drupal/Gallery2 installations.

Created a new test album with some images.
Created a new story node and used the filter [G2:item_id n=1 exactsize=150].

The item_id is an album id and should return the thumbnail highlight associated with this album and link to the album. Instead it returns an arbitrary image from the album and links to the full size image.

There is a similar problem posted at Forums » Gallery 2 Integrations » Drupal : http://gallery.menalto.com/node/71946#comment-259036

abmagfab’s picture

What are "re-write" rules? What do I need to do to get this working for me?

Edit: Oh, the plug-in for gallery. I don't have that enabled, I'm not doing anything to the URL's.

It just always points to the last photo in the album, and never to the album.

This never happened before.

jupiterchild’s picture

I think I may have mis-understood the settings and function of the G2Image tab, I thought these settings were also applied to the Filter.

Even so in my previous version of Drupal Gallery I was able configure the Filter to link thumbnails to an album:

My Drupal/Gallery installation is at http://neiljacklin.com/

In the previous version of Drupal Gallery 5.x-1.0 all the thumbnails on my site linked to the corresponding album.

In version 5.x-2.0 if the Filter setting Default image type: is set to an image filter e.g. viewedImage then a thumbnail is returned but this links to the full size image, if Default image type: is set to e.g. viewedAlbum then nothing is returned an only the filter text is visible i.e. [G2:16276 n=1 exactsize=150]

Hope this makes sense!

jupiterchild’s picture

I have figured this:

If I manually add type=specificItem to the filter

i.e. [G2:16005 n=1 type=specificItem exactsize=150]
then everything works OK.

The returned thumbnail is the 'highlight' for the album and the thumbnail links to the album id.

Did not have to do this in version 5.x-1.0 so I guess there is some issue.

jupiterchild’s picture

Title: Gallery Image Assist (G2Image) settings problem » Gallery filter problem
Component: Blocks (Image-/Grid-) » Filter / G2Image

Updated the title to better reflect the issue.

jupiterchild’s picture

With reference to this previous issue: 5.x-2.0-beta3 gallery filter: for n=1 the type defaults to 'specificItem'
http://drupal.org/node/180187

Reinstating the code in gallery_filter.inc v5.x-2.0:

	  // Handle special case of n<=1
      if ($params['n'] <= 1) {
        $params['type'] = 'specificItem';
      }

at about line 66 fixes MY problem!

profix898’s picture

The only case that is not covered with the new code is the thumbnail for an album, but thats a special case IMO. Most people insert photos (or photos from a particular album) into their nodes and not the album per se. With the old version it was not possible to use the filter to add a random/recent/... image from a specific album to a node, because specifying the album id caused the above code to explicitly set the 'type' parameter to 'specificItem'. Maybe adding 'specificItem' to the list default value could help here? If you really need album thumbnails (and only those) you could then select 'specificItem' as default. Otherwise adding the parameter manually is the only alternative, I guess. What do you think?

jupiterchild’s picture

Originally I used the Drupal Acidfree module for my gallery/albums but somewhere along the way when upgrading the Acidfree module from 4.7 to 5.x everything got seriously messed up at which point I decided to look for something that gave me more control over the administration of galleries and albums.

I installed Gallery2 and the Drupal Gallery module and was delighted with how well it integrated Drupal and Gallery2 especially when by using the basic themes of Bluemarine and Matrix (with just a little tweaking) for both elements, it gave me an almost 'seamless' integration. I had to manually add the gallery filter to some 300 plus Drupal nodes (how I wished I was a coder!) to get things working the way I wanted so this is why I am rather reluctant to have to modify the code again!

I have always used a Drupal 'story' node to include a few brief notes and/or external or related links together with a 'thumbnail' that linked to a gallery album. I found by including a URL linked back to the Drupal node in the Gallery2 album description, visitors that came in by way of a Gallery2 album could navigate to the appropriate Drupal node and learn more about the album. Best shown by the example here:

From a Drupal node: http://neiljacklin.com/cms/2007/08/11/uk/staffordshire/froghall/consall/...
From a Gallery2 album: http://neiljacklin.com/cms/gallery/v/2007/2007-08/2007-08-11-01/

To this end the filter in Drupal Gallery 5.x-1.0 worked perfectly for me i.e. thumbnails linked to albums. After upgrading to Drupal Gallery 5.x-2.0 it was somewhile before I noticed that my filter now pointed to a specific album item and not the album itself. The thought of having to modify 300 plus albums and nodes a second time is why I raised this issue.

Obviously for my installation I would very much like to retain this option i.e. to link a thumbnail to a Gallery2 album, and not being a coder would probably struggle to re-work your code if my current workaround of simply re-instating the older code failed sometime in a future modification.

Once again many thanks for all your hardwork and to anyone administrating over 300 albums with 5000+ images I would highly recommend the Drupal Gallery / Gallery2 configuration.

profix898’s picture

I've just committed a trivial patch that adds 'Specific item' to the list of default types for the G2 filter. Please let me know if this helps to solve your problem ... Thanks.

jupiterchild’s picture

Installed Gallery 5.x-2.x-dev and changed the Gallery Filter 'Default image type' to 'Specific item' and my thumbnails link to albums again. Problem fixed.

Thanks for all your help on this one, much appreciated.

profix898’s picture

Status: Active » Fixed

May I consider this fixed then? I dont think we need to keep the issue in the queue as support request ...

Anonymous’s picture

Status: Fixed » Closed (fixed)

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