Page MenuHomePhabricator

Registration date for some users is "null"
Closed, DuplicatePublicBUG REPORT

Description

We are using API:Users in a gadget in Turkish Wikipedia (Gadget link).

The code where we use this API is like this:

$.getJSON(mw.config.get("wgScriptPath") + "/api.php?format=json&action=query&list=blocks|users|usercontribs&usprop=blockinfo|editcount|gender|registration|groups&uclimit=1&ucprop= 				 timestamp&ususers=" + et + "&ucuser=" + et + "&bkusers" + et + "&meta=allmessages&amfilter=grouppage")
.done(function(query) {
   # code here...
});

This is an old code, so the params are in one line. But I tried this method also:

  mw.loader.using(['mediawiki.api', 'mediawiki.util'], function() {
  	console.log(encodeURIComponent(mw.config.get("wgTitle")));
  	
  	var params = {
		action: 'query',
		list: 'users',
		ususers: encodeURIComponent(mw.config.get("wgTitle")),
		usprop: 'blockinfo|groups|editcount|registrationdate|emailable|gender',
		format: 'json'
  	},
  	api = new mw.Api();

  	api.get( params ).done( function ( data ) {
		var users = data.query.users;
		console.log(users);
  	} );
  });

But I do not know why, for example for this user, and much more, on Turkish Wikipedia, the registration date returns null.

Why would that be?

Event Timeline

Aklapper renamed this task from When using API:Users with Mediawiki JS, registration date for some users returns "null" to Registration date for some users is "null".Nov 7 2023, 10:32 PM

@Aklapper There is a new user log for this user. https://tr.wikipedia.org/wiki/%C3%96zel:G%C3%BCnl%C3%BCk?type=newusers&user=Hakanergul&page=&wpdate=&tagfilter=&subtype=&wpFormIdentifier=logeventslist Only the first 2984 accounts on tr.wiki do not seem in the new user log. https://tr.wikipedia.org/w/index.php?oldid=23020333 New user logs began to be logged on Turkish Wikipedia after 7 September 2005. I remember a few times I saw a few accounts in the new user log that did not have registration info for them. Now I researched it in detail. Registration info don't appear for anyone from Kaanyum (User ID: 2985,created on 00.14, 8 September 2005) to E13kck (User ID: 7989, created on 03.21, 22 December 2005). https://tr.wikipedia.org/w/index.php?title=%C3%96zel:G%C3%BCnl%C3%BCk&page=&subtype=&tagfilter=&type=newusers&user=&wpFormIdentifier=logeventslist&wpdate=2005-12-22&day=22&month=12&year=2005&offset=&limit=500

This is basically the same as T347924. There will always be some accounts for which the registration date will be null. This is expected, and hardly anything can be done about it. Every gadget needs to handle that.