I'm not sure if this is the default functionality or not, because it's been a long time since I built this web site and I can't remember if I made any modifications to the way Image Galleries are displayed.

The problem is that gallery titles are not displayed on the list of image galleries (/image). I found the Views section that defines the fields and everything that are displayed in that list of galleries, but I don't know where to look for code that might help me modify the template (seems like what I should do) to get the gallery titles displayed on this page. Can anyone give me a hint or point me in the direction of what I should be looking for in the image gallery code for clues about how to write a template? The weird thing is, that the code to format the titles is in there, but the

tags are empty. It's almost like I edited some code somewhere and removed the variable for printing gallery titles. But I think I would remember (I don't) doing something that complicated. I might not remember how I did it, but I feel like I would remember doing something.

Thanks!

Comments

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

It's unclear to me which gallery titles you mean, as there are several involved.
Also, any templating you previously did is likely obsolete with the new Views support, but it would be worth you checking any custom code or theming on your site.

safetypin’s picture

Well, let me start with which gallery titles I mean: when I view the root gallery page, I see a list of galleries with photos, item counts, update dates, etcetera. On this page, I don't see the gallery names. When I view the administration section for galleries (admin/content/image) I see a list of three galleries with names. These names do not appear in the root list of galleries when I view the page (/image).

Now that I've thought about this for a while, I have a feeling that I may have done something to remove the title when I first created the site (august, 2008) but I am drawing a complete blank about what I did to accomplish this.

I don't see any custom template files anywhere in the site structure, and I've looked in the template.php file for the theme and I don't see any custom functions that might have overridden the default functionality of the image_gallery module. For help with this, this is the web site: http://faithlutheranpalmer.org/galleries - as you can see, the structure is there for the gallery titles, but the

tags are empty.

I appreciate your time, because I'm completely at a loss for how to proceed. Thanks!

joachim’s picture

Are you using Views to make your galleries?
if so, look at the image_gallery_terms view.

safetypin’s picture

Yes, I don't remember configuring it specifically to use Views, but I've looked at the image_gallery_terms view, and as far as I can tell, it should be displaying the titles of the galleries. The title is listed in the "Fields" section, and under the configuration for that field, the output is overridden with <h3>[name]</h3> in the textarea.

joachim’s picture

The view stuff is new. It'll use views unless you disable the image_gallery view. (more on this in the docs.)

If you firebug it you can see the H3 is empty. Either your theme is doing something weird or there's a problem with your data or the view.
All I can say is that it works for me on my test site -- you're going to have to debug it yourself and report here with more information if it's in fact a bug in the module.

safetypin’s picture

Okay. Thanks for your input. I'll let you know when I find something out.

frankie’s picture

I have the same problem.
I use the FourSeasons theme.

safetypin’s picture

This problem was actually "solved" via a problem I was having with a different module (thickbox), however, it seems that the problem was rooted in the gallery views. As soon as I disabled the views for image gallery and image gallery taxonomy, I got the old style pages back with the proper titles. This could not be a problem related to upgrading from Drupal 5 to 6, but this site was done long enough ago, that it may have been before image_gallery was converted to using Views. Perhaps the reason this problem is related to updating from the old style of image_gallery.

Did you do something similar, frankie? I don't have a clean install of 6 to test this on atm, but I can probably run a test after a while.

joachim’s picture

I've just seen this on another issue: check the path you are using. If you've been using a custom path for galleries on D5, you'll need to replicate that in Views.

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Sorry, without further information this issue can only be marked as won't fix.

Feel free to re-open this issue if you want to provide further information. Thanks.

MBroberg’s picture

Status: Closed (won't fix) » Active

Re-opening...
What kind of information would you like? I am getting to the point of "functional" with Drupal, knowing how to add modules and play with css and template files a little, but hopeless at "debug it yourself."
If you point us in the right direction, I can give it a shot if I ask my programmer husband for help. ;)

I just updated Drupal from 6.8 to 6.15 and also many of the modules.
My theme is custom and based off of Marinelli (I didn't write it. I inherited the job.)
My Galleries, which worked before, now do not show titles when routed though Views. It took me most of the evening to narrow this down.
The titles do show when the Gallery View is disabled.
In a different View I had created before, which used a "from scratch" View and lists only the Taxonomy terms in a block (which in effect are the Gallery Titles) still works fine.

I have seen several other posts in various places with people having the same issue and having to turn off the Gallery View in order to see their Gallery Titles. So something is up.
If we can get a hint on how to fix our themes, if that is the trouble, perhaps the non-coders will have a chance. Otherwise we will just have to disable the View and hope that eventually it will "get fixed."

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

> Otherwise we will just have to disable the View and hope that eventually it will "get fixed."

Let me start by disabusing that notion. If people do that, it will never get fixed, because I can't see the problem. I've just fired up my test setup for this module, and it looks absolutely fine to me.

So, some things to try, after you upgrade to the latest beta:

- sanity check: check you are actually looking at a view: your images should be inside a DIV with classes: "view view-image-gallery view-id-image_gallery view-display-id-image_gallery_1 view-dom-id-2" or somesuch.
- have you done something wacky to the view settings? did you change its path (that's a common cause of problems: changing path will FAIL because the taxonomy links still go to the hardcoded path)
- try reverting both the gallery views (though export them first so you have a backup, and so we can see what the problem was)
- check the whole kaboodle on Garland.
- now disable every module except image gallery and views
- now try it from scratch on a fresh test site

MBroberg’s picture

Thank you for your quick response. I think I have narrowed it down a bit.

I am using 6.x-1.0-beta5 and Drupal 6.15. Also the host has not updated to php5, they are using php 4.4.2. We have requested an update.

Yes, they are views. The source confirms it. Also there are admin hover links on the pages.

The issue seems to be with the replacement patterns. The titles do show up when using the field Taxonomy:Term but not when it is rewritten <h3>[name]</h3>. I will detail more below for you or anyone else having this problem...

This may be a separate issue, but it was hard to figure out what was wrong because I see 2 Views in the View List related to galleries:

View #1
image_gallery (node based):
Path is "image" which is the path of my photo albums prior to the upgrade.
When this view is disabled, even though the second one (below) is enabled, the path shows the correct titles in the gallery. So I figured the problem was with this one, and stopped. Not so!

Details of this view:
When I click on the path "image" with the view enabled, I can see the Gallery List. It shows the first photo of each gallery, number of images, last updated date, and a blue stripe above each gallery where the title should be. (My css for h3 has a blue background). That blue stripe has no text visible, however when I hover over the stripe I do get a clickable link just like I do on the images. It links to the right album. So the h3 and the tid link are showing up, just not the words.
The source for the title lists <h3/>. That's all. When I use Firebug and edit the text to be <h3>title</h3> the word "title" does show up in the blue bar. I think the missing titles are related to the replacement patterns in the second view (see below).

What is confusing is that the View edit page shows 2 fields listed - image and title. Nothing I did to those fields affected the missing titles. The display preview (and the URL) also shows "last updated" and "There are "n" images in this gallery." Those are not fields that are in the view field list for this view. They are in the second view. Best I can tell, this first view affects the actual galleries themselves but not the gallery list page. The fields that are listed affect what fields show when I view a single gallery. That is strange to me since I am used to views directly affecting what I see in the preview mode. The path says "image," not "image/tid/%" like other taxonomy views, and "image" leads to the gallery list.

View #2
image_gallery_terms (term-based): path is "album". It behaves the same way as above when I click on the path, although definitely going to a different page than "image" path.

Fields showing are:
Image gallery: Latest image
Taxonomy: Term
Image gallery: Count
Image gallery: Last updated time

As far as I can tell this view is the one that actually selects the fields showing up in the gallery list. When Taxonomy: Term is rewritten using the replacement pattern <h3>title</h3> the behaviors as listed above occur. When the Term is displayed as its original field, the titles show in both "image" and "album" URLs.

I think that identifies the issue correctly.

joachim’s picture

Yes: the gallery page is made up of two views working together:

- a view of nodes
- embedded above it, a view of terms that makes the child galleries.

IIRC all this is explained in the docs, but you've figured it all out correctly :)

So your missing term field is in the term-based view, if I understand you correctly.

That view's path is not 'album' by default: I take it you've edited it in some way.
When you edit the term field there, does [name] show in the possible replacement patterns?

MBroberg’s picture

I believe I did add a page display with an album path just to see what was going on.
Yes, the titles seem to be affected by the term-based view.
They appear on both "image" and "album" when using Taxonomy: Term as a field, but not when using a replacement pattern.
Yes, [name] is listed as the replacement pattern for Taxonomy: Term.

joachim’s picture

That's very weird, as if Views is proposing [name] as a possible replacement, it should work. What happens if you try other tokens in there?

MBroberg’s picture

I put in:

[name]-
[image_gallery_latest_thumbnail_1]-
[image_gallery_count]-
[image_gallery_latest_time]

I get out :
- - -

(yes they are in proper order in the field list with the rewritten field at the bottom)

MBroberg’s picture

I just checked other views and they have the same problem. So I don't think this is a gallery issue.
Thanks for your help! Maybe it will help someone else too.

MBroberg’s picture

update:
works now with newest dev of Views!
6.x-2.x-dev 2010-Jan-24

blackSP’s picture

I also just updated to 6.x-2.x-dev 2010-Jan-24 but you can see for yourself here, no gallery titles: http://www.lostsummit.net/?q=image/tid/12
I'm running Drupal 6.15

I don't know anything about tokens, I never changed a template, just using Drupal out of the box with a slightly customized Wabi theme.

Now what can I do to get this going again?

blackSP’s picture

I just disabled the image/galleries views stuff and my galleries work again as before.
So that means that these views, who were desabled before I upgraded to Drupal 6.15, were switched on by the installation procedure. I would argue that is not the proper procedure, especially when it makes previously working modules malfunctioning.

Anyway, it's OK again so it seems.

MBroberg’s picture

I agree that it is nasty to suddenly have your site not work but I find that it happens all the time when I update. Something somewhere gets slightly changed because of the interaction between modules.
I do agree that maybe having gallery views enabled automatically might not be the way to go in this case.

I see that you do not have clean URLS enabled. Might solve some issues.

It's worth learning how to do rewrites in views - they are very powerful and help with grouping by more than one field. You can also style things without having to mess with css stylesheets and you can add divs and other HTML. You can show fields inline just by putting their tokens on the same line. You can add your own text in front or after a field.

If you want to check the Views function (and learn about tokens, etc) play with the image_gallery_terms view. (or make a new term-based view and play with that so it doesn't mess up your site).
Add the Taxonomy Term field if it is not already there (that is your title field) and make sure it is not removed from display. Then check the box "rewrite the output of this field." Look for the list of "replacement patterns." What you want is [name]. Type something like
This gallery is called [name]. and see what happens.
You can also type <h2>[name]</h2> to style it as an h2 header.

I do like that the gallery is now views-based. It is a lot more powerful once it is all working. Thanks everyone for the great support!

joachim’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

> So that means that these views, who were desabled before I upgraded to Drupal 6.15, were switched on by the installation procedure. I would argue that is not the proper procedure, especially when it makes previously working modules malfunctioning.

Hmm we could make them disabled by default, but then I'm sure a large proportion of people would never discover they are there. They do work -- I have tested them considerably, and I assume they're working for a majority of users.

The thing is, this particular field has NOTHING to do with image module. It's a plain taxonomy term name field that Views core provides. I really can't do anything to debug something I can't see, and you've either resolved the problem or given up, so: closing.