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

MattKelly’s picture

Oops, my mistake. You must remove that entire if statement.

greggles’s picture

That 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

MattKelly’s picture

Surely, 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!

greggles’s picture

Can 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.

Leeteq’s picture

Status: Active » Postponed (maintainer needs more info)
greggles’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

2 weeks without a response -> closed.