Hi,
I have a problem with Pathauto in that it seems to assume that the url for the RSS feed of a page before alias is /0/feed.
Generally this isn't a problem but Views likes to make the RSS url /feed and miss out the 0 all together. This means Pathauto is unable to create an alias for the RSS feed because it has assumed it was /0/feed. Now this isn't necassarily a Pathauto problem. It's more of a small but annoying incompatibility between 2 modules.
I have already submitted an issue for the Views module because I think it's more logical to fix this at the root of the problem. Unfortunately I haven't gotten any responses there so I thought I'd post this here. Best have both modules know of the situation I suppose.
Comments
Comment #1
MediaMunkey commentedI have opened an Issue about this with the Pathauto module. I figure both modules should know about the issue especially when it's not clear who will and should correct the situation.
Link To Pathauto Issue
Comment #2
MediaMunkey commentedAh, seems I posted that last comment in the wrong place. Sorry about that.
Comment #3
gregglesCan you please describe more completely the steps to repeat this?
Start from fresh install
1. create a view
2. details about the view
....
9. end of details about the view
10. details about your pathauto pattern
Expected results are an alias like XYZ
Actual results are an alias like LMNOP
Thanks.
Comment #4
MediaMunkey commentedThis is actually really easy to repeat. It seems to effect the taxonomy view which overrides all taxonomy pages.
1. Okay so I've set up a fresh install of Drupal.
2. I have turned clean urls on, created a vocab with a term and a piece of content for it.
3. When going to the term page a RSS feed is generated with the url, 'taxonomy/term/1/0/feed'
4. Now when Pathauto creates an alias for the taxonomy page and RSS feed it assumes (in this case correctly) that the RSS feed url that it's replacing is as I stated.
5. With all default settings in Pathauto the url it generates for the RSS is, 'category/stuff/cake/feed' (yes I chose a random taxonomy name :P ).
End result: 'taxonomy/term/1/0/feed' ---- 'category/stuff/cake/feed'
6. Installing Views and enabling the default view called taxonomy_term will replace all taxonomy pages with this View.
7. Once this is done going to the the term page a RSS feed is generated with the url, 'taxonomy/term/1/feed'. As you can see, Views doesn't include '/0' in the RSS feed url.
8. All settings and patterns are the same. Pathauto creates an alias for the taxonomy page but in this case mistakenly assumes that the RSS feed is at the usual url of 'taxonomy/term/1/0/feed'
Desired result: 'taxonomy/term/1/feed' ---- 'category/stuff/cake/feed'
End result: 'taxonomy/term/1/0/feed' ---- 'category/stuff/cake/feed'
9. When going to the taxonomy term page the RSS feed url is still 'taxonomy/term/1/feed' because Pathauto mistakenly created an alias for the wrong url.
Comment #5
gregglesThanks for the very detailed description of how to repeat the issue. That was very helpful.
So, I can think of two solutions for this. First, a quick patch idea:
Use argument handling code like this in your view
It seems like it should work, but in my testing it didn't. I'm not really sure why not. I had the additional problem that my view's feed selector stopped working altogether - i.e. not even at taxonomy/term/1/feed :(
The alternative
is in http://drupal.org/node/138460#comment-621228
I'm marking this a duplicate of that issue. If you can get the views argument code to work, that would also be great to know about.
Comment #6
gregglesAfter discussing with merlinofchaos - another possible workaround: add a second feed selector. That way it should work regardless.
Comment #7
MediaMunkey commentedThanks for looking into the situation.
I tried the argument handling code you mentioned and by some degree it worked.
Normally after implementing views, going to 'taxonomy/term/1/0/feed' redirects you back to the taxonomy page. Only 'taxonomy/term/1/feed' works.
With the argument handling code in use, 'taxonomy/term/1/0/feed' seems to work correctly and so did 'taxonomy/term/1/feed'. Pathauto can then succesfully create an alias for the feed.
I'm not sure if that was all you were going for with the code because unfortunately it doesn't change the url to the RSS feed on the taxonomy page. That stays at 'taxonomy/term/1/feed'. It seems to simply enable the other url now. It's a start though.
Also, I'm unsure about the second feed selector idea. If I add a second 'Node: Feed Selector' I simply end up with a url of 'taxonomy/term/1/feed/feed'. If I instead add the other argument called 'RSS: RSS Feed Selector' I end up with 2 url's. One at '/taxonomy/term/1/feed/*' and another at '/taxonomy/term/1/*/feed'. I must be missing something.
Thanks for the help so far :)
Comment #8
gregglesYes, I guess that my solution #1 from comment 5 and my solution in comment #6 were focused on making sure that the taxonomy/term/TID/0/feed alias "worked" but if it's not being exposed to the user then who cares.
I think the real solution to this problem lies in http://drupal.org/node/138460#comment-621228
Comment #9
MediaMunkey commentedAgreed, I will keenly await for such a time as this can be implemented. Until then keep up the good work. :)
Comment #10
MediaMunkey commentedHey greggles. Just noticed you updated Pathauto recently with the fix in it.
After testing it out it works perfectly. Now my taxonomy terms are aliased correctly.
Thanks so much.
I suppose this issue can be closed now :)