Page MenuHomePhabricator

HitCounters extension doesn't count hits
Closed, ResolvedPublic

Description

Excuse the pun in the title, but the extension doesn't work. Install it on a wiki, and you will never get a single row in any of the tables, and the footer will stay blank. It will never show any view count.

This is because the database transaction system was extracted without keeping the working assumptions it had built in.

ViewCountUpdate::doUpdate used to increment a page_counter field in the page table. As being the page table, it has a row for each page, and the column exists (default to ).

In the extension, it is migrated to a separate table. A table that is empty by default. In order to work, it must insert a row for each page before it can update rows.

As it is, doUpdate() does a conditional search for page_id, finds nothing, and increments nothing.

Event Timeline

Krinkle raised the priority of this task from to Unbreak Now!.
Krinkle updated the task description. (Show Details)
Krinkle moved this task to Backlog on the MediaWiki-extensions-HitCounters board.
Krinkle subscribed.
Krinkle renamed this task from HitCount extension doesn't count hits to HitCounts extension doesn't count hits.Jun 27 2015, 6:13 PM
Krinkle renamed this task from HitCounts extension doesn't count hits to HitCounters extension doesn't count hits.
Krinkle set Security to None.

Change 221402 had a related patch set uploaded (by Krinkle):
Auto-create hit_counter rows for new counts

https://gerrit.wikimedia.org/r/221402

Change 221402 merged by jenkins-bot:
Auto-create hit_counter rows for new counts

https://gerrit.wikimedia.org/r/221402

Change 223078 had a related patch set uploaded (by Krinkle):
Auto-create hit_counter rows for new counts

https://gerrit.wikimedia.org/r/223078

Change 223078 merged by jenkins-bot:
Auto-create hit_counter rows for new counts

https://gerrit.wikimedia.org/r/223078