Page MenuHomePhabricator

Special:Log Warnings when changing log type
Closed, InvalidPublic

Description

I am getting multiple warnings on Special:Log when the main log type is changed.

Headers already sent, should send headers earlier than OutputPage->output	
MediaWiki\HeaderCallback::warnIfHeadersSent

Apparently this has been happening since before the change to HTMLForm? I tested on a random commit (cee72ecf) before the conversion was merged, and I see it there too.

Event Timeline

Prtksxna triaged this task as Medium priority.Jul 23 2018, 4:42 AM
Prtksxna created this task.
Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/extensions/CentralAuth/includes/CentralAuthHooks.php:1374)`

@Legoktm coming from MediaWiki-extensions-CentralAuth?

I can't reproduce this (with CentralAuth installed).

I can't reproduce this (with CentralAuth installed).

Must be something local then. Feel free to close.


BTW - I tested http://localhost:8080/wiki/Special:Log/block again today on 96ee0389, this is my debug log:

1IP: 10.0.2.2
2Start request GET /wiki/Special:Log/block?debug=true
3HTTP HEADERS:
4HOST: localhost:8080
5CONNECTION: keep-alive
6UPGRADE-INSECURE-REQUESTS: 1
7USER-AGENT: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 Safari/537.36
8DNT: 1
9ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8
10ACCEPT-ENCODING: gzip, deflate, br
11ACCEPT-LANGUAGE: en-GB,en;q=0.9,en-US;q=0.8,hi;q=0.7,la;q=0.6
12COOKIE: wikiUserName=Admin; wp-settings-time-1=1524815754; _pk_id.14.1fff=2379f66e1d5458c5.1526275876.1.1526276000.1526275876.; _pk_id.16.1fff=f5cf556dfb768b12.1528774758.6.1530180189.1530180178.; VEE=visualeditor; _pk_id.4.1fff=d5f75012734751ff.1532331907.2.1532408163.1532405388.; wikiUserID=1; centralauth_User=Admin; wiki_session=rjcdai2ki5sq9obsaoiibr55mr7a2sef; centralauth_Session=7d5cdb0c36c2c8e44c4c01b5671b1580
13[caches] cluster: RedisBagOStuff, WAN: mediawiki-main-default, stash: redis, message: RedisBagOStuff, session: RedisBagOStuff
14[caches] LocalisationCache: using store LCStoreCDB
15[MessageCache] MessageCache::load: Loading en... local cache is empty, got from global cache
16[CentralAuthVerbose] Loading CentralAuthUser for user Admin from cache object
17[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: calling initLB() before first connection.
18[DBReplication] Wikimedia\Rdbms\LBFactory::getChronologyProtector: using request info {
19"IPAddress": "10.0.2.2",
20"UserAgent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit\/537.36 (KHTML, like Gecko) Chrome\/67.0.3396.99 Safari\/537.36",
21"ChronologyProtection": false,
22"ChronologyPositionIndex": 0,
23"ChronologyClientId": null
24}
25[DBConnection] Wikimedia\Rdbms\LoadBalancer::openConnection: connected to database 0 at '127.0.0.1'.
26[DBQuery] wiki BEGIN /* Wikimedia\Rdbms\Database::query (User::idFromName) */
27[DBQuery] wiki SELECT /* User::idFromName */ user_id FROM `user` WHERE user_name = 'Admin' LIMIT 1
28[session] CentralAuthSessionProvider::provideSessionInfo: logged in from session
29User::getBlockedStatus: checking...
30[DBQuery] wiki SELECT /* Block::newLoad */ ipb_id,ipb_address,ipb_timestamp,ipb_auto,ipb_anon_only,ipb_create_account,ipb_enable_autoblock,ipb_expiry,ipb_deleted,ipb_block_email,ipb_allow_usertalk,ipb_parent_block_id,ipb_reason AS `ipb_reason_text`,NULL AS `ipb_reason_data`,NULL AS `ipb_reason_cid`,ipb_by,ipb_by_text,NULL AS `ipb_by_actor` FROM `ipblocks` WHERE ipb_address = 'Admin'
31User: loading options for user 1 from override cache.
32[preferences] Loading global options for user 'Admin'
33[MessageCache] MessageCache::load: Loading en-gb... local cache is empty, got from global cache
34Unstubbing $wgParser on call of $wgParser::firstCallInit from MessageCache->transform
35Parser: using preprocessor: Preprocessor_DOM
36Unstubbing $wgLang on call of $wgLang::_unstub from ParserOptions->__construct
37[error] [80345207a8f7dd7e92224f28] /wiki/Special:Log/block?debug=true ErrorException from line 309 of /vagrant/mediawiki/includes/debug/MWDebug.php: PHP Deprecated: Use of Using $input in LogEventsListGetExtraInputs hook was deprecated in MediaWiki 1.32. [Called from SpecialLog::show in /vagrant/mediawiki/includes/specials/SpecialLog.php at line 254]
38[DBQuery] wiki SELECT /* Wikimedia\Rdbms\DatabaseMysqlBase::setBigSelects */ @@sql_big_selects LIMIT 1
39[DBQuery] wiki SET /* Wikimedia\Rdbms\DatabaseMysqlBase::setBigSelects */ sql_big_selects=1
40[DBQuery] wiki SELECT /* IndexPager::buildQueryInfo (LogPager) */ log_id,log_type,log_action,log_timestamp,log_namespace,log_title,log_params,log_deleted,user_id,user_name,user_editcount,log_comment AS `log_comment_text`,NULL AS `log_comment_data`,NULL AS `log_comment_cid`,log_user,log_user_text,NULL AS `log_actor`,(SELECT GROUP_CONCAT(ct_tag SEPARATOR ',') FROM `change_tag` WHERE ct_log_id=log_id ) AS `ts_tags` FROM `logging` LEFT JOIN `user` ON ((user_id=log_user)) WHERE log_type = 'block' ORDER BY log_timestamp DESC LIMIT 51
41[DBQuery] wiki SET /* Wikimedia\Rdbms\DatabaseMysqlBase::setBigSelects */ sql_big_selects=1
42[DBQuery] wiki COMMIT /* MediaWiki::preOutputCommit */
43MediaWiki::preOutputCommit: primary transaction round committed
44MediaWiki::preOutputCommit: pre-send deferred updates completed
45MediaWiki::preOutputCommit: LBFactory shutdown completed
46[error] [80345207a8f7dd7e92224f28] /wiki/Special:Log/block?debug=true ErrorException from line 309 of /vagrant/mediawiki/includes/debug/MWDebug.php: PHP Notice: Headers already sent, should send headers earlier than OutputPage->output [Called from MediaWiki\HeaderCallback::warnIfHeadersSent in /vagrant/mediawiki/includes/HeaderCallback.php at line 61]
47[headers-sent] Warning: headers were already sent from the location below
48[error] [80345207a8f7dd7e92224f28] /wiki/Special:Log/block?debug=true ErrorException from line 72 of /vagrant/mediawiki/includes/WebResponse.php: PHP Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309)
49[error] [80345207a8f7dd7e92224f28] /wiki/Special:Log/block?debug=true ErrorException from line 72 of /vagrant/mediawiki/includes/WebResponse.php: PHP Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309)
50[error] [80345207a8f7dd7e92224f28] /wiki/Special:Log/block?debug=true ErrorException from line 72 of /vagrant/mediawiki/includes/WebResponse.php: PHP Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309)
51[error] [80345207a8f7dd7e92224f28] /wiki/Special:Log/block?debug=true ErrorException from line 72 of /vagrant/mediawiki/includes/WebResponse.php: PHP Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309)
52[DBQuery] wiki BEGIN /* Wikimedia\Rdbms\Database::query (LinkBatch::doQuery (for Skin::preloadExistence)) */
53[DBQuery] wiki SELECT /* LinkBatch::doQuery (for Skin::preloadExistence) */ page_id,page_len,page_is_redirect,page_latest,page_content_model,page_namespace,page_title FROM `page` WHERE (page_namespace = '2' AND page_title = 'Admin') OR (page_namespace = '3' AND page_title = 'Admin') OR (page_namespace = '4' AND page_title IN ('Privacy_policy','About','General_disclaimer') )
54[DBQuery] wiki SELECT /* User::checkNewtalk */ user_id FROM `user_newtalk` WHERE user_id = '1' LIMIT 1
55[DBQuery] wiki SELECT /* ResourceLoaderWikiModule::getTitleInfo */ page_namespace,page_title,page_touched,page_len,page_latest FROM `page` WHERE (page_namespace = '8' AND page_title IN ('Common.js','Vector.js') )
56User: loading options for user 1 from override cache.
57[preferences] Loading global options for user 'Admin'
58User: loading options for user 1 from override cache.
59[preferences] Loading global options for user 'Admin'
60User: loading options for user 1 from override cache.
61[preferences] Loading global options for user 'Admin'
62User: loading options for user 1 from override cache.
63[preferences] Loading global options for user 'Admin'
64[GlobalTitleFail] MessageCache::parse called by BaseTemplate->makeLink/htmlspecialchars/Message->__toString/Message->toString/Message->parseText/MessageCache->parse with no title set.
65[GlobalTitleFail] MessageCache::parse called by BaseTemplate->makeLink/htmlspecialchars/Message->__toString/Message->toString/Message->parseText/MessageCache->parse with no title set.
66[gitinfo] Computed cacheFile=/vagrant/mediawiki/gitinfo.json for /vagrant/mediawiki
67[gitinfo] Cache incomplete for /vagrant/mediawiki

and these are the warnings on the page:

1( ! ) Deprecated: Use of Using $input in LogEventsListGetExtraInputs hook was deprecated in MediaWiki 1.32. [Called from SpecialLog::show in /vagrant/mediawiki/includes/specials/SpecialLog.php at line 254] in /vagrant/mediawiki/includes/debug/MWDebug.php on line 309
2Call Stack
3# Time Memory Function Location
41 0.0021 364384 {main}( ) .../index.php:0
52 0.0239 369440 require( '/vagrant/mediawiki/index.php' ) .../index.php:5
63 1.2560 5411496 MediaWiki->run( ) .../index.php:42
74 1.2828 5499928 MediaWiki->main( ) .../MediaWiki.php:524
85 1.2896 5503864 MediaWiki->performRequest( ) .../MediaWiki.php:867
96 1.3026 5519608 SpecialPageFactory::executePath( ) .../MediaWiki.php:288
107 1.3028 5520984 SpecialPage->run( ) .../SpecialPageFactory.php:569
118 1.3303 5616328 SpecialLog->execute( ) .../SpecialPage.php:566
129 1.5266 6644568 SpecialLog->show( ) .../SpecialLog.php:147
1310 1.5604 6843056 LogEventsList->showOptions( ) .../SpecialLog.php:254
1411 1.5640 6857808 wfDeprecated( ) .../LogEventsList.php:136
1512 1.5640 6857808 MWDebug::deprecated( ) .../GlobalFunctions.php:1121
1613 1.5640 6859232 MWDebug::sendMessage( ) .../MWDebug.php:241
1714 1.5640 6859456 trigger_error ( ) .../MWDebug.php:309
18(10.0.2.15)
19( ! ) Notice: Headers already sent, should send headers earlier than OutputPage->output [Called from MediaWiki\HeaderCallback::warnIfHeadersSent in /vagrant/mediawiki/includes/HeaderCallback.php at line 61] in /vagrant/mediawiki/includes/debug/MWDebug.php on line 309
20Call Stack
21# Time Memory Function Location
221 0.0021 364384 {main}( ) .../index.php:0
232 0.0239 369440 require( '/vagrant/mediawiki/index.php' ) .../index.php:5
243 1.2560 5411496 MediaWiki->run( ) .../index.php:42
254 1.2828 5499928 MediaWiki->main( ) .../MediaWiki.php:524
265 1.6135 7003904 MediaWiki->{closure:/vagrant/mediawiki/includes/MediaWiki.php:872-878}( ) .../MediaWiki.php:886
276 1.6135 7003904 OutputPage->output( ) .../MediaWiki.php:874
287 1.6136 7020432 WebResponse->header( ) .../OutputPage.php:2407
298 1.6136 7020432 MediaWiki\HeaderCallback::warnIfHeadersSent( ) .../WebResponse.php:68
309 1.6136 7020544 MWDebug::warning( ) .../HeaderCallback.php:61
3110 1.6136 7021096 MWDebug::sendMessage( ) .../MWDebug.php:164
3211 1.6136 7021320 trigger_error ( ) .../MWDebug.php:309
33(10.0.2.15)
34( ! ) Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309) in /vagrant/mediawiki/includes/WebResponse.php on line 72
35Call Stack
36# Time Memory Function Location
371 0.0021 364384 {main}( ) .../index.php:0
382 0.0239 369440 require( '/vagrant/mediawiki/index.php' ) .../index.php:5
393 1.2560 5411496 MediaWiki->run( ) .../index.php:42
404 1.2828 5499928 MediaWiki->main( ) .../MediaWiki.php:524
415 1.6135 7003904 MediaWiki->{closure:/vagrant/mediawiki/includes/MediaWiki.php:872-878}( ) .../MediaWiki.php:886
426 1.6135 7003904 OutputPage->output( ) .../MediaWiki.php:874
437 1.6136 7020432 WebResponse->header( ) .../OutputPage.php:2407
448 1.6158 7021184 header ( ) .../WebResponse.php:72
45(10.0.2.15)
46( ! ) Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309) in /vagrant/mediawiki/includes/WebResponse.php on line 72
47Call Stack
48# Time Memory Function Location
491 0.0021 364384 {main}( ) .../index.php:0
502 0.0239 369440 require( '/vagrant/mediawiki/index.php' ) .../index.php:5
513 1.2560 5411496 MediaWiki->run( ) .../index.php:42
524 1.2828 5499928 MediaWiki->main( ) .../MediaWiki.php:524
535 1.6135 7003904 MediaWiki->{closure:/vagrant/mediawiki/includes/MediaWiki.php:872-878}( ) .../MediaWiki.php:886
546 1.6135 7003904 OutputPage->output( ) .../MediaWiki.php:874
557 1.6171 7021168 WebResponse->header( ) .../OutputPage.php:2408
568 1.6171 7021168 header ( ) .../WebResponse.php:72
57(10.0.2.15)
58( ! ) Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309) in /vagrant/mediawiki/includes/WebResponse.php on line 72
59Call Stack
60# Time Memory Function Location
611 0.0021 364384 {main}( ) .../index.php:0
622 0.0239 369440 require( '/vagrant/mediawiki/index.php' ) .../index.php:5
633 1.2560 5411496 MediaWiki->run( ) .../index.php:42
644 1.2828 5499928 MediaWiki->main( ) .../MediaWiki.php:524
655 1.6135 7003904 MediaWiki->{closure:/vagrant/mediawiki/includes/MediaWiki.php:872-878}( ) .../MediaWiki.php:886
666 1.6135 7003904 OutputPage->output( ) .../MediaWiki.php:874
677 1.6332 7129080 WebResponse->header( ) .../OutputPage.php:2420
688 1.6332 7129080 header ( ) .../WebResponse.php:72
69(10.0.2.15)
70( ! ) Warning: Cannot modify header information - headers already sent by (output started at /vagrant/mediawiki/includes/debug/MWDebug.php:309) in /vagrant/mediawiki/includes/WebResponse.php on line 72
71Call Stack
72# Time Memory Function Location
731 0.0021 364384 {main}( ) .../index.php:0
742 0.0239 369440 require( '/vagrant/mediawiki/index.php' ) .../index.php:5
753 1.2560 5411496 MediaWiki->run( ) .../index.php:42
764 1.2828 5499928 MediaWiki->main( ) .../MediaWiki.php:524
775 1.6135 7003904 MediaWiki->{closure:/vagrant/mediawiki/includes/MediaWiki.php:872-878}( ) .../MediaWiki.php:886
786 1.6135 7003904 OutputPage->output( ) .../MediaWiki.php:874
797 1.6342 7129128 WebResponse->header( ) .../OutputPage.php:2426
808 1.6342 7129128 header ( ) .../WebResponse.php:72

Prtksxna closed this task as Invalid.Jul 30 2018, 7:24 AM

This is probably a legit issue, but it only appears with some specific configuration settings. You need at least $wgDevelopmentWarnings = true; set to cause it (otherwise the trigger_error call doesn't happen), but apparently it's not enough since I still can't reproduce.