Extension talk:HitCounters/Archive

Thank you for creating this extension!
I look forward to following its development. --PhotographerTom (talk) 18:31, 2 June 2015 (UTC)


 * Indeed, many kudos to Mark and the others involved! --&#91;&#91;kgh&#93;&#93; (talk) 07:13, 19 June 2015 (UTC)

Extension is empty :(
https://git.wikimedia.org/tree/mediawiki%2Fextensions%2FHitCounters does not contain files.--StasR (talk) 09:52, 14 June 2015 (UTC)


 * Dunno if it's a boy or girl but it's here now. ;) --&#91;&#91;kgh&#93;&#93; (talk) 14:31, 15 June 2015 (UTC)


 * Thanks. I go to inspect ;) --StasR (talk) 23:07, 15 June 2015 (UTC)

Update from 1.24
Will this extension use old data statistic? Or it was removed from database by maintenance script?

BTW: Download link is broken.


 * If I am not mistaken the old core tables are still preserved when upgrading to 1.25 so the data should still be there. This is the zip for MW 1.25.x at the moment. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 11:59, 17 June 2015 (UTC)


 * Thanks. It's work, but with Extension:DynamicPageList (third-party) and popularity sorting give this:


 * SELECT page_namespace,page_title FROM `wiki_page` INNER JOIN `wiki_categorylinks` AS c1 ON ((page_id = c1.cl_from) AND (c1.cl_to='Category')) WHERE page_is_redirect = '0' ORDER BY page_counter DESC LIMIT 10


 * 1054 Unknown column 'page_counter' in 'order clause' (localhost)


 * --UksusoFF (talk) 14:08, 17 June 2015 (UTC)


 * I get


 * The DPL extension (version 2.3.0) produced a SQL statement which lead to a Database error. The reason may be an internal error of DPL or an error which you made, especially when using DPL options like titleregexp. Query text is:  Error message is: Unknown column 'page_counter' in 'order clause' (localhost)


 * with DPL, so I think DPL is now incompatible with this extension and needs to be updated. --&#91;&#91;kgh&#93;&#93; (talk) 16:17, 17 June 2015 (UTC)


 * Ouch, i'm talking about: Extension:DynamicPageList_(Wikimedia) --UksusoFF (talk) 18:03, 17 June 2015 (UTC)


 * Has anyone had any problems with Extension:DynamicPageList (Wikimedia)? --PhotographerTom (talk) 16:41, 18 June 2015 (UTC)


 * Yes, see the line you replied to. --&#91;&#91;kgh&#93;&#93; (talk) 07:07, 19 June 2015 (UTC)


 * The new release of Extension:DynamicPageList3 supports the HitCounters extension now and resolves this issue. Alexia E. Smith (talk) 20:12, 29 July 2015 (UTC)


 * Thanks an ton Alexia. I have updated extension's page accordingly. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 20:44, 29 July 2015 (UTC)

Undefined method WikiPage::getCount
[Tue Jun 16 19:15:29.355832 2015] [:error] [pid 23688] [client 10.65.246.2:53829] PHP Fatal error: Call to undefined method WikiPage::getCount in .../extensions/AbuseFilter/AbuseFilter.class.php on line 329, referer: http://www.nablawiki.ru/index.php?action=edit&preload=... --StasR (talk) 16:46, 16 June 2015 (UTC)
 * Looks like the AbuseFilter extension is incompatible too I'm afraid. --&#91;&#91;kgh&#93;&#93; (talk) 18:48, 2 July 2015 (UTC)

A database query error has occurred.
→ Filed as 

Hmm ..., I am a bit puzzled. I upgraded from 1.22.15 to 1.25.1. In a second step I added the HitCounters extension. From the error message I get I come to believe that the former "hit_counter" table was removed at the first step:

A database query error has occurred. This may indicate a bug in the software.

Query: SELECT page_counter AS hits FROM `hit_counter` WHERE page_id = '1' Function: HitCounters\HitCounters::getCount Error: 1146 Table 'myWiki.hit_counter' doesn't exist (localhost)

--&#91;&#91;kgh&#93;&#93; (talk) 16:04, 17 June 2015 (UTC)


 * After running "update.php" via the Extension:MaintenanceShell extension this error message vanishes and all the previous hits for pages show up. So I now figured out that core used "hitcounter" and this extension creates "hit_counter" and somehow moves the content over to keep on running. So this issue is invalid. --&#91;&#91;kgh&#93;&#93; (talk) 16:13, 17 June 2015 (UTC)

HitCounters does not create a table if installed via web updater
→ Filed as 

Actually a follow up to the previous post. I tried to add this extension via the web updated since it is a shared hosing environment however when running the update script no table is created. So I naturally get the same error message as before.

--&#91;&#91;kgh&#93;&#93; (talk) 16:07, 17 June 2015 (UTC)


 * I believe it is web updater limitation as mentioned below - Manual:Upgrading
 * If your database is already big and in high production usage, then you should not be using the Web updater, e.g. because the update process will time out when the maximum_execution_time is reached. In that case you should use update.php from the command-line interface (not from the web). What exactly is "too big" depends on your server (e.g. on its performance, the load and on how long the maximum execution time of PHP allows the script to run). If your wiki is too big for the web updater and your hosting provider does not allow command-line access, then you need to migrate your wiki to another hosting account, preferably to one that does have shell access.
 * --68.175.56.26 17:40, 8 July 2015 (UTC)


 * That's true but this is not really specific to this extension. However the problem is the same. The web updater just does not create the necessary table even for small instances. --&#91;&#91;kgh&#93;&#93; (talk) 20:15, 8 July 2015 (UTC)

functionality has changed
→ Filed as 

In core, the  magic word showed the total views for the entire wiki. This extension shows the number of views for the current page. Is that by design? --Ike @ WikiWorks 18:07, 28 June 2015 (UTC)


 * I agree that this should be changed back. Something like  which takes the behaviour you described in your post could be a nice enhancement though. --&#91;&#91;kgh&#93;&#93; (talk) 18:52, 2 July 2015 (UTC) Ping Paladox: Could this be done somehow?

Changing popular pages view count
First of all, thank you for the extension!

I assume that I can reset or modify view counts via database access but would like to know if there is any user friendly version of making changes to the popular page list. --68.175.56.26 17:43, 8 July 2015 (UTC)


 * Hmm, why do you want to count the hits in the first place if you do not like the results being used by the wiki for e.g. the popular pages list? No, afaik there is no user friendly version around and I doubt that someone will create an extension for doing so. --&#91;&#91;kgh&#93;&#93; (talk) 20:21, 8 July 2015 (UTC)

What does the extension actually do?
I just updated to MW 1.25.1.

page.page_counter is dropped and I see no view count info in the footer anymore.

Also, Special:PopularPages reads "There are no results for this report".

What does the extension actually do? --Subfader (talk) 12:51, 10 August 2015 (UTC)


 * It provides the page views functionality removed in MW 1.25. I suspect that you did not run update.php. Cheers --&#91;&#91;kgh&#93;&#93; (talk) 13:17, 10 August 2015 (UTC)


 * I've read the description and I did run update.php ;)

extensions/HitCounters/update.php Modifying hc_id field of table hitcounter ...done. ...hit_counter_extension table already exists. Creating hit_counter table ...done. Table page contains page_counter field. Dropping ...done.
 * When page.page_counter is dropped on the MW update, does that mean HitCounters starts counting all views from scratch?
 * Edit: hit_counter was empty, so I just created hit_counter myself from the old page table. Now Special:PopularPages and page view counters work as expected. Still, the update problem remains. --Subfader (talk) 13:32, 10 August 2015 (UTC)


 * So far I have switched two wikis to this extension. I both cases the tables were created and the existing number of views was taken. Hmm, something is in the water ... --&#91;&#91;kgh&#93;&#93; (talk) 14:30, 10 August 2015 (UTC)


 * I updated to MW 1.25 (web installer) and then I installed HitCounters. I then found that page.page_counter was gone and that hit_counter was empty. If that's the wrong procedure, then the extension page should inform us what to do. --Subfader (talk) 17:20, 10 August 2015 (UTC)


 * There must be something really wrong. About a month ago I updated to MW 1.25 and since the web updater did not work it used the Maintenance Shell extension to set this on up. Even though I added this extension a couple of days after the actual upgrade of MW all the stats appeared. I just looked a the table an see that the "hit_counter_extension" table is empty and unused but instead the "hit_counter" table is used. So now I am very confused too even though the counters still work on my MW 1.25. Even stranger is that it is not working for you at all. :( --&#91;&#91;kgh&#93;&#93; (talk) 08:38, 12 August 2015 (UTC)

Will check again when I update on the live system. --Subfader (talk) 16:04, 12 August 2015 (UTC)
 * I ran update.php from the extension folder, not in maintenance. Could make a difference. ANd I cannot tell if page.page_counter was empty after the MW update or after HitCounters/uopdate.php.


 * Worked this time running maintenance/update.php --Subfader (talk) 14:39, 15 August 2015 (UTC)

HitCounters::getCount in other extensions?
I try to hack InfoAction.php to read the view count again.

$views = HitCounters::getCount($title);

But "Class 'HitCounters' not found". How can I fix this? --Subfader (talk) 11:27, 13 August 2015 (UTC)

Wrong NS-links on Special:Statistics
HitCounters adds the "Most viewed pages" section On Special:Statistics.

Non-article pages are linked without their NS prefix. --Subfader (talk) 15:16, 13 August 2015 (UTC)

HitCounters doesn't update new Page IDs
See https://phabricator.wikimedia.org/T109180 --Subfader (talk) 23:19, 18 August 2015 (UTC)