Pathauto Special Identifier Not Converting Paths to Lowercase

sp_key - October 20, 2009 - 16:41
Project:Custom Breadcrumbs
Version:6.x-1.5
Component:custom_breadcrumbs
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

Hi,

I present some articles with a "featured video" block at the top-content area and a "top things to do" Views list at the content bottom area with the actual article sitting in between.

My URLs for the Article content type are constructed using the following pathauto rule: article/[title-raw]

Now the issue I'm having with custom breadcrumbs is the following:

I have configured custom breadcrumbs like below:
Title: [title-raw]
Path: {pathauto}|article/[title-raw]
// NOTE: pathauto with normal tags

The above configuration generates this URL: http://localhost/drupal/article/My-example instead of this: http://localhost/drupal/article/my-example (notice the capital letter on the first example)

Now, I understand that whichever case you put on the address bar you should get exactly the same page in return but in my case this is not true. Clicking on the breadcrumb link I get ONLY the article WITHOUT the featured video and Views list mentioned above. Once I manually replace the "M" with a lower case "m" I return to my real link.

According to the General Settings of pathauto, Character Case is set to "Change to lower case" so I believe this should also reflect on the Custom Breadcrumbs?

Please let me know if this isn't making sense or you need more info.

Thanks for your time

#1

MGN - October 20, 2009 - 20:01

This is a known problem with pathauto. There are patches (for all versions of pathauto) available at #343851: pathauto_cleanstring() does not convert to lowercase (consolidate all text altering code to pathauto_cleanstring). It would be great if you could test the patch and see if it fixes your problem. Note greggles reminder in that issue to update the pathauto alias after the patch has been applied. Please leave feedback on that issue if it works for you. Its an old issue and it would be great to have that patch committed.

The issues #296516: Clean path using pathauto function and #525216: Another malformed url are also related.

#2

sp_key - October 21, 2009 - 21:19

MGN, thanks for your response.
Unfortunately I don't have the level of understanding to perform this patch neither can I find a tutorial that makes sense to me for a Windows machine. Don't get me wrong, I have actually tried using GNUWin32 but all I got was a bunch of errors.

Btw, on the link you sent me there is an interesting comment at the very bottom made from vthirteen which I totally agree. [quote]The problem is not with the path of the page but with the link generated by pathauto for custom breadcrumbs[/quote].
In essense pathauto converts my uppercases to lowercases fine but for some reason custom breadcrumbs doesn't pick this.

I don't know whether the problem is here or there as I don't have this knowledge. I trust you know this, unfortunately for me I'll probably have to wait till next release or bug the kind drupal community more...

#3

MGN - October 21, 2009 - 21:32

Custom breadcrumbs just uses the data returned by the token. It doesn't manipulate it (convert the case) at all. The problem is with the pathauto_cleanstring() function.

I'll check the patch in the pathauto queue to make sure it still works with the latest dev.

#4

sp_key - October 21, 2009 - 23:35

Thanks for your immediate response. I'll wait for an update.

#5

MGN - October 22, 2009 - 02:43

Now that the patches in #343851: pathauto_cleanstring() does not convert to lowercase (consolidate all text altering code to pathauto_cleanstring) have been committed, you can try out the development snapshot (either 6.x-1.x-dev or 6.x-2.x-dev) of pathauto and see if that solves the problem.

#6

vthirteen - October 23, 2009 - 09:42

as i said in the other thread (http://drupal.org/node/343851) the patch included in the most recent 6.x-1.x version doesn't seem to turn upper case to lower case in the link in Custom Breadcrumbs. everything else seems to be working fine.
(my custom breadcrumbs use vocab-raw and my vocabulary has upper case).

#7

MGN - October 24, 2009 - 14:38
Status:active» postponed (maintainer needs more info)

@vthirteen can you check to see if you have a space between the pathauto identifier and the pipe symbol

<pathauto> |article/[title-raw]

This could prevent the pathauto identifier from working...remove any spaces if you have them. I'll fix this in the dev version soon, but it would help to know if that is the source of the problem that you are seeing...

If that doesn't fix it please copy your titles and path information here for me. Put it between code html tags so the identifiers show up correctly in the post.

Thanks

#8

vthirteen - October 25, 2009 - 19:07

indeed the new the most recent pathauto version solved the problem. for some reason the result was still wrong when i updated the module (maybe drupal cache was involved), but it's ok now.

my apologies and thank you for your reply!
afaik, this issue can be closed.

#9

vthirteen - October 25, 2009 - 19:14
Status:postponed (maintainer needs more info)» fixed

set to fixed

#10

Diegen - November 2, 2009 - 11:55

Hi,
what did you do to get it working ? I'm having the same issue here. Upgraded but still displaying Capitals..

#11

MGN - November 2, 2009 - 18:41

Have you done the following?

1. Upgrade pathauto to the latest dev release
2. At admin/build/path/pathauto under the general settings fieldset, check 'Change to lower case' and save configuration.
3. In the paths section of your custom breadcrumb use the pathuto identifier by placing <pathauto>| before the path that you would like changed to lower case.

That should do it. I would recommend clearing the cache to be sure the page is up to date when you view it.

#12

System Message - November 16, 2009 - 18:50
Status:fixed» closed

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

#13

marcushenningsen - November 19, 2009 - 13:05
Status:closed» fixed

Just confirming that the latest dev-version of pathauto (6.x-2.x-dev) fixes this problem. Thanks for the good responses.

#14

TravisCarden - November 21, 2009 - 04:21
Title:Problem with case sensitive URLs» Pathauto Special Identifier Not Converting Paths to Lowercase
Status:fixed» active

I'm still having the problem. I have followed MGN's steps in #11 and cleared caches. I'm using 6.x-2.x-dev, Nov. 5 with the following path:

<pathauto>|programs/radio-and-resources/[termpath-raw]

...and I still get uppercase characters in the result.

The previous comment asserts that using Pathauto 2.x-dev fixes the problem, but I'm not quite comfortable using crazy new code on a production site.

#15

GreenSkunk - November 25, 2009 - 17:56

@TravisCarden
I was using pathauto-6.x-1.2 and had the same issue.

I haven't tried pathauto-6.x-1.x-dev (Oct 21) but pathauto-6.x-2.x-dev (Nov 12) does work as the site's URLs are now experiencing lowercase love on a site that is launching soon.

#16

MGN - November 25, 2009 - 21:08

pathauto-6.x-1.x-dev has also been fixed and (imo) is stable enough to use on a production site (but as always, use caution - be sure to test it out first). It should be less buggy than the "stable" release.

#17

MGN - December 3, 2009 - 03:55
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.