Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#5482 closed Bug/Something is broken (fixed)

https://id.mayfirst.org "my account" link is broken

Reported by: Daniel Kahn Gillmor Owned by: Daniel Kahn Gillmor
Priority: Medium Component: Tech
Keywords: id.mayfirst.org drupal Cc:
Sensitive: no

Description

If i'm logged into my OpenID account, and i visit https://id.mayfirst.org/, there is a link on the left-hand side titles "my account" -- it appears to link to https://users/dkg (obviously bad) but i think it should link to https://id.mayfirst.org/users/dkg .

If i try to edit my user account, the "View" tab also points to the bad link.

The underlying html uses a schemeless URL (//users/dkg), though i think it means to use a server-absolute URL (/users/dkg). Maybe this is a drupal bug?

Could some more-drupal-minded person look into this?

Attachments (1)

id.mayfirst.org_My_Account_link.jpeg (119.0 KB) - added by Joseph 7 years ago.

Download all attachments as: .zip

Change History (9)

comment:1 Changed 7 years ago by Ross

dkg,

Other's aren't seeing this behavior. Can you confirm that this remains a problem for you?

~/ross

comment:2 Changed 7 years ago by Ross

The underlying html for me says href="/user/ross" .

comment:3 Changed 7 years ago by Daniel Kahn Gillmor

Yes, it hasn't changed for me:

<a href="//users/dkg">My account</a></li>

comment:4 Changed 7 years ago by Ross

Owner: set to Joseph
Status: newassigned

I attempted clearing the cache using both drush and manually truncating the cache tables in the database. I also removed all of the session data from dkg's account.

In sites/all/modules/mfpl_openid/mfpl_openid.module there is an alias rewrite on line 88:

path_set_alias('user/' . $account->uid, '/users/' . $username);

It seems that this might be related to the problem, but I'm not sure.

~/ross

comment:5 Changed 7 years ago by Daniel Kahn Gillmor

is that this path_set_alias?

If so, are path aliases supposed to have leading slashes? If they do have leading slashes, shouldn't drupal know better than to prepend them with another slash before emitting them? Is this a bug in drupal generally? Is there a reason it's applying to my account, but not to other people's?

Changed 7 years ago by Joseph

comment:6 in reply to:  5 Changed 7 years ago by Joseph

Owner: changed from Joseph to Daniel Kahn Gillmor

Just as ross notes in comment 2, my My Account is properly defined.

Replying to https://id.mayfirst.org/dkg:

If so, are path aliases supposed to have leading slashes?

In my experience with Drupal, you don't normally include leading slashes.

Is there a reason it's applying to my account, but not to other people's?

I checked the database, and your account had two aliases defined for whatever reason, one with and one without a leading slash. No other accounts I checked had a definition with a leading slash, so I removed that one. dkg, can you login again and test whether it's working now?

comment:7 Changed 7 years ago by Daniel Kahn Gillmor

Resolution: fixed
Status: assignedclosed

Woo, it works now! Thank you Joseph, for fixing my special snowflake problem.

If you still have it, i'd be interested in seeing the database commands you used to find and remove the extra alias.

comment:8 Changed 7 years ago by Joseph

I found the alias with the below.

mysql> SELECT * FROM url_alias WHERE dst LIKE "%dkg%";
+-------+------------------+------------+----------+
| pid   | src              | dst        | language |
+-------+------------------+------------+----------+
|  17   | user/10/identity | dkg        |          |
|  18   | user/10          | users/dkg  |          |
|  1267 | user/10          | /users/dkg |          |
+-------+------------------+------------+----------+
3 rows in set (0.00 sec)

Then just removed the last errant row.

Please login to add comments to this ticket.

Note: See TracTickets for help on using tickets.