The reason is an extra uid column in the rpx_linked_account table existed on 6.x-2.x, but not on the 7.x-2.x version.

Patch follows.

CommentFileSizeAuthor
#1 rpx-1678124-1.patch919 bytesdmitriy.trt

Comments

dmitriy.trt’s picture

Status: Active » Needs review
StatusFileSize
new919 bytes
lsolesen’s picture

Status: Needs review » Reviewed & tested by the community

I can confirm that the patch fixes the issue with the "Linked account page"

ChrisValentine’s picture

I've also upgraded from Drupal 6.x to 7.x and note the database table rpx_linked_account is empty - which explains why the table under the Linked accounts table is also empty (would be good if that table could actually be hidden and replaced by "You have no existing linked accounts") even though my account is linked to both Facebook and Twitter. Is there any way to get that table re-populated, perhaps by checking for and adding a record if necessary when someone logs in?

lsolesen’s picture

@ChrisValentine Did you try the patch?

ChrisValentine’s picture

No, but given there is no column 'uid' in the table 'rpx_linked_account', I can't see how it would do anything.

torgospizza’s picture

The patch in #1 works for me too. Because I am migrating a D6 site to D7 using a fresh install of D7, the Migrate module, and some database tables that have been copied over directly*, I ran into this error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'uid' in where clause is ambiguous: SELECT am.aid, authname, provider_name, provider_title FROM {authmap} am INNER JOIN {rpx_linked_account} la ON am.aid = la.aid WHERE module = :module AND uid = :uid; Array ( [:module] => rpx_core [:uid] => 1 ) in rpx_user_identities() (line 17 of /sites/all/modules/rpx/rpx_ui.pages.inc).

This is due to the query in rpx_ui.pages.inc:
$result = db_query("SELECT am.aid, authname, provider_name, provider_title FROM {authmap} am INNER JOIN {rpx_linked_account} la ON am.aid = la.aid WHERE module = :module AND uid = :uid", array(':module' => 'rpx_core', ':uid' => $account->uid));

Another option would have been to specify "l.uid" in the WHERE clause of the query, but it's probably better to fix this in the table schema as the patch does, since it makes for slightly cleaner code, and doesn't require future code queries to always specify the table alias.

I don't believe the issue @ChrisValentine is having is relevant to the patch (or the original issue) - you should file a separate Issue with more information about your problem.

* Some misc data tables, such as for CCK and RPX, had to be copied over manually since I am not doing an "upgrade" of Drupal along the usual upgrade path. Since it's unclear that the schema has changed between the D6 and 7 versions of the RPX module, it makes sense to include this update hook in the .install module to prevent others from experiencing the same fatal error.