13

Consider this user's MetaSE profile. It shows he has 113 Network accounts:
User1 accnts section


But his network profile only lists 107 accounts:
User1 network profile

(You can get a count of accounts by running $(".account-container").length from the console on a network profile page.)


The API lists 112 accounts, which is proper once you factor in that the API doesn't do Area 51 at all.

Note that all the users in this question were chosen because (A) they have a lot of accounts and (B) none of them are hidden (a moderator can tell).

Comparing the API to the web page, the following, not hidden, accounts are missing from said web page:

There's nothing obviously different about them. (Seem to be mainly just for flagging spam).


Another user has 163 accounts on his MetaSE profile, but his network profile only lists 162. Using the API(Code below), it seems that he really has 164 accounts and these are missing from his network profile (and not hidden):

Again, these don't appear to be special.

There are several other users with discrepancies. So, the questions are:

1) Why does the number of accounts shown on many user's site profiles not match the number of accounts on the user's network profile?

2) Why are random accounts, that are not hidden, not shown on many user's network profiles?

3) Why does the number of accounts shown on many user's site profiles not seem correct given the accounts listed in the API? (after correcting for hidden accounts and the Area 51 omission)



I used 2 code snippits for quick and dirty account compares.

This one is run on network profile, accounts tabs:

var sqlch = $(".account-container").each ( (J, node) => {
    var siteLnk = $(node).children ("a");
    console.log (siteLnk[0].href);
} );


This one is run from the browser console on almost any old page(It calls the API):

var usrNetId    = 2477436;
var myKey       = "";  //  "&key=3TIJ...(";  // key is optional
getPageOfAccnts (1);
function getPageOfAccnts (pageNum) {
    fetch (
        `https://api.stackexchange.com/2.2/users/${usrNetId}/associated?page=${pageNum}&pagesize=100&types=main_site&filter=!*LCuZZRrnwsL79I2${myKey}`
    )
    .then (function (response) {
        if (response.ok)  return response.json();
        throw new Error (`API problem: Error ${response.status}, ${response.statusText}`);
    } )
    .then (function (rJsn) {
        if (rJsn.backoff  ||  rJsn.error_id) {
            throw new Error (`From API: Backoff ${rJsn.backoff}, Error: ${rJsn.error_id}, ${rJsn.error_message}, ${rJsn.error_name}`);
        }
        console.log (`Quota remaining: ${rJsn.quota_remaining}; Items found: ${rJsn.items.length}`);

        let uAccounts = rJsn.items;
        console.log ("\n-User's accounts:\n-----------------");
        for (let zAccnt of uAccounts) {
            console.log (`${zAccnt.site_url}/users/${zAccnt.user_id}/`, zAccnt.user_type);
        }
        if (rJsn.has_more) {
            let newPageNm   = rJsn.page + 1;
            if (newPageNm < 10)  getPageOfAccnts (newPageNm);  // sanity check.
        }
    } );
};
  • Out of curiosity, how many accounts does each user's Area 51 account's "accounts" tab say the user has? – Sonic the Reinstate Monica-hog Mar 28 at 4:51
  • @SonictheWizardWerehog, in your case, 101?!? Not sure what's going on there and let's call that a separate issue. ... PS: 101 may be a design limit for that tab on Area 51. – Awesome Poodles Mar 28 at 5:02
  • 2
    @AwesomePoodles Worthy question, I've been studying this for 2 hours and have no answer either. I can tell you that badge counts don't match either - things aren't always counted correctly, but that's not a satisfying answer. I forced a recalculation on a half dozen of my accounts a few days ago, and scored a few hundred flair (visible on A51) for my trouble. My Flair Badge scored partial credits (I gained more Badges than I received Notifications for, or 'main SE activity') – Rob Mar 28 at 6:13
  • The profiles are messed up and are not mapped to the network account correctly. If I recall correctly, there was a bug a while ago that caused a lot of these to pop up. It was fixed to stop causing them but I don't think anyone ever cleaned up the unmapped profiles. – animuson Mar 28 at 6:19
  • 1
    Possibly related: Reputation sync from main to meta is stalled (maybe another scheduled job just died again) – iBug says Reinstate Monica Mar 28 at 7:06
  • 2
    @MetaBugWizard Not related. The problem here occurs when the profile is created or more commonly on account merges. Only manual intervention can fix it. – animuson Mar 28 at 14:13

You must log in to answer this question.

Browse other questions tagged .