Me Aliases does not work in tandem with pathauto user aliases

mrfelton - July 3, 2009 - 10:21
Project:me aliases
Version:6.x-2.7
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

I have pathauto set to generate aliases for user pages using the [user-raw] token. This gives me user pages at /username, rather than the standard /user/username. With Me Aliases enabled and set to 'Rewrite links generated by the drupal menu system' user edit pages are now at /user/me/edit, and not /me/edit as I would like.

What I really want is to be able to also set Me aliases to use [user-name] instead of 'me, giving me edit pages like /username/edit, rather than /user/username/edit. However, setting Me Aliases to use the [user-name] token currently results in a fatal error (which I'll report in a separate bug in a minute!)

#1

cdale - July 5, 2009 - 22:32

I think this is quite tricky, but it is something I would like to investigate, but from what I already know, I think the only way to achieve what you want would be to implement custom_url_rewrite_outbound() and custom_url_rewrite_inbound() which are not functions that I think are appropriate for a module, but I could certainly provide some implementations that would most likely achieve what you are after.

Part of the problem is that path-auto actually creates a real path as it where when the user information is saved, where as me actually dynamically switches out the uid. It's not a static path. I could check for an alias in the link rewriting, but it would never go to "/me/edit", in fact, I'm not even sure that path auto does that by itself does it? So even though you have /username, isn't the edit page always at /user/[UID]/edit? I'll look into this more when I get a chance.

Did you figure out the fatal-error?

#2

mrfelton - July 6, 2009 - 07:26

Yes, you are right that with pathauto setting the profile page alias to /username the edit page is still /user/[UID]/edit - that is what I was hoping to try and fix with the help of me aliases. Regarding the fatal error, it hasn't shown its head for a while but if it returns I'll be sure to let you know.

Thanks.

#3

cdale - July 7, 2009 - 09:37

The bug with me aliases and pathauto aside here, could http://drupal.org/project/subpath_alias maybe do what you want?

 
 

Drupal is a registered trademark of Dries Buytaert.