I have created 7 URL aliases without any problem. But when I tried to make an alias for system path "user/login" as "login", I got error message:
The path 'user/login' is either invalid or you do not have access to it.
What confuses me most is the example of URL aliases is saying like below:
Some examples of URL aliases are:
* user/login => login
* image/tid/16 => store
* taxonomy/term/7+19+20+21 => store/products/whirlygigs
* node/3 => contact
I am sure there is nothing wrong with the permission as I could create 7 of other aliases, and they are working fine. So what could be the reason?
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | path-alias-admin.patch | 934 bytes | mr.baileys |
| #4 | path-alias-admin.patch | 917 bytes | mr.baileys |
Comments
Comment #1
aryanto commentedI just added the URL alias directly into url_alias table in MySQL, and it works alright. I added src=/user/login and dst=login on the new pid.
But I don't think this is the solution as there might be other issues related to this.
Comment #2
nunami commentedI am also unable to create an alias for user/login. I'm surprised as it's mentioned in the 'getting started' documentation.
Aside from directly modifying the table, is there a fix to this problem?
Comment #3
mr.baileysThe
user/loginpath is only accessible to anonymous users:Once you're logged in, you are no longer authorized to access the user/login page...
This explains why it works when you add it to the table manually: you're bypassing the access check that happens when you enter URL aliases through the interface. I agree that it's an unfortunate example in the "Getting Started" guide.
Comment #4
mr.baileysI think the administrator should be able to insert aliases for all URLs (if they exist), even if he/she does not have access to the URL. The user/login path is a fine example: because the administrator fails the "user_is_anonymous" access check, it's impossible to set up an alias for it.
Attached is an attempt to fix this, by ignoring the access check if the user is the superadmin.
Comment #5
mr.baileysImproved the check for administrator.
Comment #6
chx commented#190867: Remove access check for anonymous users when creating aliases recently a patch blocking that has been uncovered so work now can commence.
Comment #7
negative_zero commentedEasy but slightly risky workaround...