Page MenuHomePhabricator

Should ItemContent::isCountable return true if the Item is not a redirect?
Closed, DeclinedPublic

Description

As per T144687: Change $wgArticleCountMethod in Wikidata from default ('link') to 'any' we might want to consider changing ItemContent::isCountable from the current !$this->isRedirect() && !$this->getItem()->isEmpty() (Item is not a redirect and contains data) to just !$this->isRedirect() (Item is not a redirect).

Event Timeline

hoo created this task.Oct 13 2016, 1:42 AM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 13 2016, 1:42 AM
Addshore triaged this task as Low priority.Nov 3 2018, 2:20 PM
Addshore moved this task from incoming to needs discussion or investigation on the Wikidata board.
Addshore added subscribers: Lydia_Pintscher, Addshore.

T144687 discussed this a bit, but only really talked about entities with no statements.

This has been open for 2 years and not touched.
@Lydia_Pintscher should totally empty items be counted in the number of items?

If No, we can just close this ticket, if yes, lets make the 1 line code change and regenerate the stats number / count.

Do we know how many items we currently have that are completely empty?

hoo added a comment.Nov 10 2018, 6:22 PM

Do we know how many items we currently have that are completely empty?

MariaDB [wikidatawiki_p]> SELECT COUNT(*) FROM page WHERE page_namespace = 0 AND page_is_redirect = 0 AND page_len < 170;            
+----------+
| COUNT(*) |
+----------+
|      190 |
+----------+
1 row in set (2.01 sec)

This might not be the exact number, but from some spot checks it looks pretty good.

Lydia_Pintscher closed this task as Declined.Nov 17 2018, 7:00 PM

Ok thanks! Then it really doesn't matter so let's just leave it as is.