From memory, I typed /project/themes rather than going through the downloads tab. The two tabs on the top that allow you to view by date were missing. I thought that was odd and did a little investigating and discovered that the proper link is /project/Themes. Would be nice if these could both point to the same page.

Michelle

Comments

dww’s picture

Assigned: Unassigned » dww
Status: Active » Needs review

just creating a URL alias for "project/themes" has the side effect of making that be the default you see when you go to the real "project/Themes"... not sure if that's a bug or a feature. ;) the uppercase versions seem to be there for a reason (those are the names of the taxonomy terms). otoh, it's kinda weird having mixed case in the URL. i personally prefer the lowercase.

if people are cool with the URLs being visually the lowercase version all the time (unless of course you manually type the uppercase version) i'd be happy to add the 5 URL aliases.

e.g. check out: http://scratch.drupal.org/project/themes (i added that one on s.d.o).

(there's no patch, but this still needs review before i just fix it).

thanks,
-derek

dww’s picture

Component: web site » Broken link
Assigned: dww » Unassigned
Status: Needs review » Active

Bah, that solution isn't really going to work. I think we need a patch to project.module's hook_menu() to really fix this. When generating the menu items for these terms, we should do two things:

1) strlower() the term name when adding the "real" menu item
2) define a dummy menu item at the Capitalized version that redirects to the lowercase

of course, seems evil to spend much time on this with views support so high on the list for project* priorities. that said, it's not immediately obvious how to best solve this via views, either.

dww’s picture

Title: Lowercase /themes doesn't have tabs » Inconsistent capitalization of URLs for project/[Type] pages
Project: Drupal.org site moderators » Project
Version: » 5.x-1.x-dev
Component: Broken link » User interface

#267654: Change the links under /project marked duplicated of this. Also, I promised we'd fix this for the D6 upgrade of d.o. It's clear that the solution here is in the project* codebase, so moving this into the right queue.

aclight’s picture

As a point of information, I wouldn't bother on a patch for this at the moment, unless the idea is to also patch the D5 version of project. In the D6 version of the project module, almost all of what's currently in hook_menu() is gone, including the bit that the patch in #267654: Change the links under /project touched. This is because Views handles all of this for us right now.

On the down side, views handles links to taxonomy terms the same way that the project module does currently. In other words, when you're at /project, the link to modules is /project/Modules and not /project/module. I'll talk with Earl and see what our options are for changing this behavior, but I'm not sure this is something that is simple to override.

avpaderno’s picture

The Views module can be used to change how a node list appears, but the Project module must provide a default implementation of the node list that the administrator of a Drupal powered web site can then overwrite using Views. The integration with Views is not an "excuse" to not change the URLs capitalization.

It's useless to create an alias for the capitalized version that redirects to the lowercase one; once the taxonomy term is passed to strlower() or drupal_strtolower(), the URL is like any other URLs used by the core modules.

-- Kiam@AVPnet

aclight’s picture

@Kiam: My point was that the default views that project uses in D6 use views code (and not custom code) to create a list of taxonomy terms (such as seen at /project). The links to each of these terms, as built by the views module, use capitalized letters if the terms themselves are capitalized. Unless views has some setting somewhere to force links to be in all lower case, which I am not aware of, to get the behavior you request we will have to write additional code for this specific purpose. So I'm not making an "excuse" here, but what I'm saying is that Views keeps the same capitalization that the terms themselves have.

My earlier point was that any patch you create for this issue will only ever apply to the D5 version of project module, as in the D6 version none of the code you would need to change for the D5 version even exists in the D6 version. The impression I got from what dww said above is that he wants to fix this in the D6 version but not necessarily in the D5 version. If that's the case, your patch will not be used, and I didn't want you to waste your time.

As a point of information, in the D6 version, going to /project/Modules and /project/modules give you the exact same page (this is not the case in the D5 version of project, as you pointed out in your original issue). However, the links to various project terms on the page at /projects do keep the capitalization of the terms that are linked to.

avpaderno’s picture

I agree.
I was seeing the issue just in a Drupal 5.x perspective, but I agree it would be a waste of time to change how the URLs appear in Drupal 5.x, if then on Drupal 6.x they appear again with the first letter in upper case.

My patch, anyway, was not the best, as it was lowering just the first character of the taxonomy term, when it should have made a simple call to drupal_strtolower().

I would set this issue to "won't fix".

aclight’s picture

Status: Active » Postponed

Ok, cool. I will talk with Earl and figure out how to best do this for the D6 version, assuming it's possible. Setting to postponed for now since this is basically blocked on #157694: Upgrade project module to 6.x.

aclight’s picture

Ok, I've fixed this in the still-in-progress D6 port of the project module by modifying the project_term_path() function.

drumm’s picture

Issue summary: View changes
Status: Postponed » Closed (cannot reproduce)