Page MenuHomePhabricator

"Invalid API response" editing any comment
Closed, ResolvedPublic

Description

Comment Streams8.0-dev (86ff6fe) 06:08, 27 December 2022 (downloaded today)
MediaWiki1.39.1
PHP8.0.12 (cgi-fcgi)
MySQL8.0.28-0ubuntu0.20.04.3

LocalSettings.php settings:

wfLoadExtension( 'CommentStreams' ); # db changes
$wgAllowDisplayTitle = true; #Required for CommentStreams
$wgRestrictDisplayTitle = false; #Required for CommentStreams
$wgCommentStreamsEnableSearch = false; #Prevent random char titles from display in search/autocomplete
$wgGroupPermissions['csmoderator']['cs-moderator-edit'] = true;
$wgGroupPermissions['csmoderator']['cs-moderator-delete'] = true;

What occurs: Attempting to edit any message results in an "Invalid API Response" on front-end. And the following in the logs:

2023-01-06 01:17:41 vps19550 my_db-name_: [Y7d2tYKdYd@IWY10951j2QAAAAE] /w/api.php   TypeError: Unsupported operand types: string & int
#0 /home/my_user/mysite.com/w/includes/dao/DBAccessObjectUtils.php(53): DBAccessObjectUtils::hasFlags(string, integer)
#1 /home/my_user/mysite.com/w/includes/page/WikiPageFactory.php(133): DBAccessObjectUtils::getDBOptions(string)
#2 /home/my_user/mysite.com/w/includes/api/ApiBase.php(1057): MediaWiki\Page\WikiPageFactory->newFromID(integer, string)
#3 /home/my_user/mysite.com/w/extensions/CommentStreams/includes/ApiCSReplyBase.php(57): ApiBase->getTitleOrPageId(array, string)
#4 /home/my_user/mysite.com/w/includes/api/ApiMain.php(1900): MediaWiki\Extension\CommentStreams\ApiCSReplyBase->execute()
#5 /home/my_user/mysite.com/w/includes/api/ApiMain.php(875): ApiMain->executeAction()
#6 /home/my_user/mysite.com/w/includes/api/ApiMain.php(846): ApiMain->executeActionWithErrorHandling()
#7 /home/my_user/mysite.com/w/api.php(90): ApiMain->execute()
#8 /home/my_user/mysite.com/w/api.php(45): wfApiMain()
#9 {main}

Notes: There's nothing in web inspector Console, and everything in the network tab shows status 200 including api.php (per the comments of prior report here).
What should happen: csmoderator should be able to edit comments without error.