Page MenuHomePhabricator

Backtrace on action=expandtemplates
Closed, ResolvedPublic

Description

On bnwiki several pages including infoboxes aren't rendering (action=render returns an empty html document). Even the content outside of the template isn't showing up and there is no visible template error.

Example:
[[bn:মোহাভি মরুভূমি]]
action=parse returning an empty document:
http://bn.wikipedia.org/w/api.php?action=parse&title=%E0%A6%AE%E0%A7%8B%E0%A6%B9%E0%A6%BE%E0%A6%AD%E0%A6%BF%20%E0%A6%AE%E0%A6%B0%E0%A7%81%E0%A6%AD%E0%A7%82%E0%A6%AE%E0%A6%BF
action=expandtemplates gives a PHP error:
http://bn.wikipedia.org/w/api.php?action=expandtemplates&title=%E0%A6%AE%E0%A7%8B%E0%A6%B9%E0%A6%BE%E0%A6%AD%E0%A6%BF%20%E0%A6%AE%E0%A6%B0%E0%A7%81%E0%A6%AD%E0%A7%82%E0%A6%AE%E0%A6%BF


Version: 1.18.x
Severity: major

Details

Reference
bz31820
TitleReferenceAuthorSource BranchDest Branch
Fix buster-php74-fpm which was based on buster-php72repos/releng/dev-images!40hasharphp72-used-in-buster-php74-fpmmain
Install Xdebug from Debian package, update source of php72 and php74repos/releng/dev-images!36hasharxdebug-and-php74main
Update gitlab-runner to v15.10.1repos/releng/gitlab-cloud-runner!234eoghaneoghan/gitlab-runner-upgrademain
Refresh buster-php81-* images to upgrade phprepos/releng/dev-images!33hasharphp81-upgrademain
Customize query in GitLab

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 11:56 PM
bzimport added a project: MediaWiki-Parser.
bzimport set Reference to bz31820.

action=parse & action=expandtemplates need the text parameter with the content. title doesn't automatically fetch the content from the wiki. Behavior in 1.17 is the same.
In trunk expandtemplates will give an error 'The text parameter must be set'.

API Error:

<?xml version="1.0"?>
<api servedby="srv296">

<error code="internal_api_error_MWException" info="Exception Caught: Internal error in ApiResult::setElement: Bad parameter" xml:space="preserve">

#0 /usr/local/apache/common-local/php-1.18/includes/api/ApiBase.php(1241): wfDebugDieBacktrace('Internal error ...')
#1 /usr/local/apache/common-local/php-1.18/includes/api/ApiResult.php(149): ApiBase::dieDebug('ApiResult::setE...', 'Bad parameter')
#2 /usr/local/apache/common-local/php-1.18/includes/api/ApiResult.php(180): ApiResult::setElement(Array, '*', NULL)
#3 /usr/local/apache/common-local/php-1.18/includes/api/ApiExpandTemplates.php(84): ApiResult::setContent(Array, NULL)
#4 /usr/local/apache/common-local/php-1.18/includes/api/ApiMain.php(692): ApiExpandTemplates->execute()
#5 /usr/local/apache/common-local/php-1.18/includes/api/ApiMain.php(358): ApiMain->executeAction()
#6 /usr/local/apache/common-local/php-1.18/includes/api/ApiMain.php(342): ApiMain->executeActionWithErrorHandling()
#7 /usr/local/apache/common-local/php-1.18/api.php(115): ApiMain->execute()
#8 /usr/local/apache/common-local/live-1.5/api.php(3): require('/usr/local/apac...')
#9 {main}

</error>
</api>

(In reply to comment #1)

action=parse & action=expandtemplates need the text parameter with the content.
title doesn't automatically fetch the content from the wiki. Behavior in 1.17
is the same.
In trunk expandtemplates will give an error 'The text parameter must be set'.

That's true and I usually do it that way, but this time I did it that way cause the text={{... form which I tried first didn't work. So both ways produce empty pages, but only the title one a PHP error, dunno if that's caused by the page or is another error (but I'm sure it shouldn't be that way)

Tagged r93977 for merging to fix the backtrace.

(In reply to comment #4)

Tagged r93977 for merging to fix the backtrace.

Isn't it's prequisite also needed?

Has been fixed as it seems (tested with examples out of the first comment)