Setup
- MediaWiki 1.27.1 (8c593e7) 22:49, 26 October 2016
- PHP 7.0.15-0ubuntu0.16.04.4 (apache2handler)
- MySQL 5.7.17-0ubuntu0.16.04.1
Issue
When trying to access "Special:ActiveUsers" I get the following error:
A database query error has occurred. This may indicate a bug in the software.
Query:
SELECT user_name,user_id,COUNT(*) AS `recentedits`,qcc_title FROM `querycachetwo`,`user`,`recentchanges` WHERE qcc_type = 'activeusers' AND qcc_namespace = '2' AND (user_name = qcc_title) AND (rc_user_text = qcc_title) AND (rc_type != '5') AND (rc_type != '6') AND (rc_log_type IS NULL OR rc_log_type != 'newusers') AND (rc_timestamp >= '20170210201050') AND (NOT EXISTS (SELECT 1 FROM `ipblocks` WHERE (ipb_user=user_id) AND ipb_deleted = '1' )) GROUP BY qcc_title ORDER BY qcc_title LIMIT 301
Function:
IndexPager::buildQueryInfo (ActiveUsersPager)
Error:
1055 Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'DB0231020151216.user.user_name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (localhost)
Backtrace:
#0 /.../w/includes/db/Database.php(901): DatabaseBase->reportQueryError('Expression #1 o...', 1055, 'SELECT user_na...', 'IndexPager::bui...', false)
#1 /.../w/includes/db/Database.php(1234): DatabaseBase->query('SELECT user_na...', 'IndexPager::bui...')
#2 /.../w/includes/pager/IndexPager.php(365): DatabaseBase->select(Array, Array, Array, 'IndexPager::bui...', Array, Array)
#3 /.../w/includes/pager/IndexPager.php(219): IndexPager->reallyDoQuery('', 301, true)
#4 /.../w/includes/pager/IndexPager.php(419): IndexPager->doQuery()
#5 /.../w/includes/specials/SpecialActiveusers.php(77): IndexPager->getBody()
#6 /.../w/includes/specialpage/SpecialPage.php(479): SpecialActiveUsers->execute(NULL)
#7 /.../w/includes/specialpage/SpecialPageFactory.php(576): SpecialPage->run(NULL)
#8 /.../w/includes/MediaWiki.php(282): SpecialPageFactory::executePath(Object(Title), Object(RequestContext))
#9 /.../w/includes/MediaWiki.php(745): MediaWiki->performRequest()
#10 /.../w/includes/MediaWiki.php(519): MediaWiki->main()
#11 /.../w/index.php(43): MediaWiki->run()
#12 {main}Since 1.27 is LTS ...