The fixes for the image gallery path aliases in 2.1 seem to be a step in the right direction, but they're introducing a new issue which is interfering with the menu module's functionality.

As greggle's notes in this comment: http://drupal.org/node/188606#comment-661361

"Also, after applying this I noticed that links from taxonomy/term/58 point to image/tid/58 and then image/tid/58 points to the actual alias."

The two main problems with this are:

  1. the Image Gallery taxonomy pages are no longer accessible
  2. if you have a menu item pointing to an image gallery, with the link set to either taxonomy/term/# or image/tid/#, the menu and breadcrumbs are not generated correctly when viewing the image gallery. Only if you have the full text alias for the image gallery does the menu module function correctly, but I don't think that's good practice since the alias could easily change underneath you, while the image/tid/# value will not.

Also, I'm no expert, but is it not bad practice to create an alias to a path that already exists? The image_gallery module is already providing the image/tid/# paths.

After deleting the all the image/tid/# aliases for taxonomy/term/# system paths, everything seems to work correctly.

Comments

greggles’s picture

Thanks for your feedback on this. Can you clarify specifically what behavior you think should happen?

ashtonium’s picture

Thanks for the quick reply.

hmm... Well, for my own use I'd say that pathauto doesn't need to worry about setting aliases for the image gallery taxonomy paths (taxonomy/term/#) and only needs to set them for the actual image gallery paths (image/tid/#). But I shouldn't be selfish.

So, for a more inclusive solution, I'd say that the best option (if not too difficult) would be to have two seperate pathauto pattern settings for the image galleries (on /admin/settings/pathauto). One for the normal taxonomy path and one for the image gallery path. That would even allow people to set up the current behavior if they wanted to.

greggles’s picture

Well, the "two setting" solution is what we had but it's not scalable.

Perhaps we can go with just not aliasing the taxonomy/term/# value. Can you get some more attention on this from other image gallery users?

Hetta’s picture

Either of #2 or #3 would work for me - currently, I create a new gallery, go in to url_alias to fix it (taxonomy/term/...), and add another one for the image/tid - which is the one actually shown to users. I think I had the taxonomy/term ones shown to users only with one of the taxonomy context modules (which I've since disabled).

Thanks for looking into this!

greggles’s picture

So, the proposals are: "2 setting solution" which is not scalable.

Alternate 1: only create the alias for image/tid

Alternate 2: only create the alias for taxonomy/term/tid

@Hetta - I think that for you alternate 2 would be a better solution, right?

Hetta’s picture

No, default image galleries show image/tid/###, which I currently change to something sensible by hand.
So Alternate 1 would be better.

Thanks!

greggles’s picture

Yes, yes, I said alternate 2 would be better but I meant #1. Sorry about that. I still would like to get more feedback on this though.

himagarwal’s picture

I also faced the same problem. tid/{n} is being showed to actual users. As I'm using pathauto and it only allows taxonomy based url aliases for image gallery not for tid. It is obviously better to "create the alias for tid" as it is shown to users. Creating alias for taxonomy is useless unless it is shown to users.

greggles’s picture

by the way, I think that global redirect module will make this "work right".

But yes, if someone provides a patch for this and another person tests it then I will commit it.

himagarwal’s picture

After some thinking I came to that by using "taxonomy" for actual users and avoiding tid/{n} will get the perfection. As in case of blogs, forums, story, pages they show taxonomy, while they use tid for tags. So for perfection, avoiding tid and just using taxonomy will be great.

dman’s picture

I'm confused by this problem, as I seem to be getting highly unpredictable results.
I have image_gallery and pathauto. Also taxonomy_context and was experimenting with taxonomy_menu.

All in all, sometimes I click on a gallery name, and sometimes I see the gallery version of it (image/tid/n) and sometimes I find the taxonomy version of it (taxonomy/term/n) which looks quite different, and is never wanted.
The aliases that go with it are unpredictable, sometimes I get system paths, sometimes aliased ones, and I've encountered problems when creating manual links to them in my menu.

... I guess there is a pattern in this madness, but I've just not seen it yet.
I'm just trying to create an intuative, self-managing gallery, but the more tuning I do, the worse it gets.

What was the old behaviour with image_gallery? Was there always a conflict between image/tid/n and taxonomy/term/n? If you were viewing an image, and it listed its terms (including its parent gallery) and you clicked on it - what context did you get thrown back into?

Sorry, I don't have a constructive suggestion here yet - I'm still not sure what the desired result is :-) Just chiming in to say I'm glad someone is thinking about it!

akahn’s picture

Tracking this. I want my image gallery paths to be pretty, e.g.: /image/Community+Gardens .

underpressure’s picture

I would also like a url like that. image/ocean/atlantic

Hetta’s picture

I'm using image + taxonomy + taxonomy_context + pathauto.
My image galleries get named /image/tid/# by default.
In addition, I have taxonomy/term/# that are pathauto'd to something else.

That taxonomy/term/# isn't shown by image, taxonomy or taxonomy_context. (Currently, it's shown nowhere at all on my site).

It's entirely possible that the taxonomy/term/# URLs are shown by taxonony_breadcrumb, a module I used to have installed - but the image gallery layout in that module is less useful than that in image_gallery, and the breadcrumb functionality is found in taxonomy_context.

Can we pretty please have image/tid/# -> pathauto URLs?

Thanks!

dman: I think either image or pathauto changed the image_gallery behaviour a few months ago; do you get a different set of URLs on an earlier version of image, or perhaps on older image galleries?

himagarwal’s picture

So, will there be a solution coming out, Moderator?
We all read very knee to see the url alias working for end user.

greggles’s picture

@himagarwal - I guess you are referring to me as moderator. I assume at some point there will be a fix. I don't personally plan to work on this, but encourage someone else to solve it and I can review the patch.

As I said earlier, I believe that global redirect will mitigate the problem - http://drupal.org/project/globalredirect

vito_swat’s picture

I've Image 5.x-2.x-dev (2008-lt.-13), Pathauto 5.x-2.1and Global Redirect 5.x-1.2 installed and I can confirm behavior described as number 2 by ashtonium in the begining of this issue. I don't know what he meant as Image Gallery taxonomy pages so I couldn't confirm number 1.

I think we can remove aliasing of taxonomy/term/# for galleries (it an easy fix) or to alias it as [gallery alias]_0 (as it was in some previous version of pathauto. I can work on this during weekend.

rubensans’s picture

It will be great this to be solved.

I also have the same problems.

Ex.

http://www.dimsport.es/es/image/tid/47

when it should be something like:

http://www.dimsport.es/es/image/JET

Thanks.

ashtonium’s picture

I have the Global Redirect module installed, and that serves to continually redirect the client down to the last URL in the chain (the "pretty" alias for the image gallery page) whether they go to the taxonomy/term/# or the image/tid/# URLs. However, as I stated above, it doesn't work to put one of those URLs in the menu structure. The menu system only recognizes that you're on the correct page if enter that final alias in as the path for the Menu Item.

Now maybe I'm getting picky, but it seems I should be able to enter one of the more permanent URLs like I normally do. As a note for those looking to do this, the temporary fix is to just delete the path alias pointing from taxonomy/term/# to image/tid/# Not a scalable solution, but it gets things working at least.

Sounds like at the very least, people want a working alias on for the image/tid/# URL and the taxonomy/term/# URL for image galleries can be ignored by pathauto. I'd like to help and I'll start looking through the pathauto code and see if I can figure out what's going on well enough to write a patch for this.

greggles: do you hang out in IRC frequently, in case I have questions?

greggles’s picture

@ashtonium, I'm often in irc, but not reliably during the next couple of months.

Leeteq’s picture

Subscribing.

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

This hasn't had any more traction in almost two years. Is this a problem in Drupal 6? Should this be marked as won't fix?

thousand_miles’s picture

I am getting this problem on Drupal 6 too.

I have taxonomy + taxonomy menu + Image installed. I don't have any image gallery set up and the taxonomy terms are already pointing to it. The only way I manage to 'fix' is by disabling image_gallery, which is not a fix by any definition.

mennonot’s picture

I recently installed Pathauto 5.x-2.3 in Drupal 5.x with Global Redirect 5.x-1.5 on an existing site. The site was built around image galleries using /image/tid/# links. After I turned on automatic aliases for the image gallery, these links were not redirected to the new "pretty" aliases as suggested by greggles in #9 and #16. Is there any way to recover those old /image/tid/# aliases and get them redirecting to the new "pretty" aliases?

dave reid’s picture

Status: Postponed (maintainer needs more info) » Active
dave reid’s picture

Status: Active » Closed (won't fix)

Drupal 5 is now unsupported, as well as Pathauto for D5.