Topic on Extension talk:HitCounters

Special:PopularPages limit

2
John Koughto (talkcontribs)

I did install this extension however the Special:PopularPages is limited to 10000 entries (navigating using offset= in the URL).

It's not cached and i.e. Special:ShortPages on the same wiki is capable of displaying items from 10001 and more (the wiki have about 80000 articles).

Is there a way to make it so it loads more than 10000 entries? I did check the code and it seems there are no visible limit in this extension and the special page itself is marked as not expensive (so MiserMode shouldn't have effect on it).

WikiForMen (talkcontribs)

I found this in "abstract class QueryPage":

	/**
	 * Get max number of results we can return in miser mode.
	 *
	 * Most QueryPage subclasses use inefficient paging, so limit the max amount we return
	 *
	 * @stable to override
	 * @since 1.27
	 * @return int
	 */
	protected function getMaxResults() {
		// Max of 10000, unless we store more than 10000 in query cache.
		return max( $this->getConfig()->get( 'QueryCacheLimit' ), 10000 );
	}

Try to add this into "class SpecialPopularPages":

	protected function getMaxResults() {
		$your_limit = 20000;
		return max( $this->getConfig()->get( 'QueryCacheLimit' ), $your_limit );
	}

--WikiForMen (talk) 19:09, 4 October 2023 (UTC)

Reply to "Special:PopularPages limit"