Closed (fixed)
Project:
Pathauto
Version:
5.x-2.1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Apr 2008 at 16:59 UTC
Updated:
13 May 2008 at 08:21 UTC
On line 53 you can find this,
if ($node->pathauto_perform_alias || !user_access('create url aliases')) {
This causes a problem: !user_access('create url aliases')
So if a user doesn't set a custom path, but they have access to, pathauto doesn't generate a path (even though an automatic path is set).
This fixes the problem:
if ($node->pathauto_perform_alias) {
Sorry, I don't know how to submit patches and don't have time to read docs, currently. If I'm missing something, let me know.
Thanks!
Comments
Comment #1
MattKelly commentedOops, my mistake. You must remove that entire if statement.
Comment #2
gregglesThat particular bit of code has been edited and re-edited and re-written several times, so I'm hesitant to just change it.
Can you describe the particular workflow that is causing a problem for you? Something like:
0. Install pathauto and leave all settings as default
1. As a user with the "create url aliases" permission
2. Visit node/add/page
3. Do....
Expected results:
Something
Actual results:
Something else
Comment #3
MattKelly commentedSurely, thanks for the quick reply.
I'll write a workflow from a "fresh install" perspective if this doesn't suffice.
1. Setup a path for a content type
2. Logged in as a user with the 'create url aliases' permission.
3. Created a node with that content type.
Expected results:
The path would be /cs/
Actual results:
The path was /node/
So I want the path renaming behavior to apply to *every* user.
Let me know if you need a more thorough run through. Thanks!
Comment #4
gregglesCan you clarify why it should be /cs/?
Also, this behavior doesn´t happen for me as you have described it, so I am not sure what is going on. Starting from a fresh install might help me understand the situation.
Comment #5
Leeteq commentedComment #6
greggles2 weeks without a response -> closed.