Page MenuHomePhabricator

Class 'Smarty' not found
Closed, InvalidPublic

Description

Setup

  • MediaWiki 1.34.0-rc.0 (366bf66) 22:03, 15 October 2019
  • PHP 7.2.19-0ubuntu0.18.04.2 (apache2handler)
  • MariaDB 10.1.41-MariaDB-0ubuntu0.18.04.1
  • Widgets 1.4.0 (d1271af) 09:58, 16 September 2019

Issue
This happens after updating from version 1.3.0. When returning to it the error goes away.

/wiki/Main_Page Error from line 24 of /../w/extensions/Widgets/WidgetRenderer.php: Class 'Smarty' not found

Backtrace

#0 /../w/includes/parser/Parser.php(3626): WidgetRenderer::renderWidget(Parser, string, string, string, string)
#1 /../w/includes/parser/Parser.php(3332): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#2 /../w/includes/parser/PPFrame_Hash.php(254): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#3 /../w/extensions/ParserFunctions/includes/ParserFunctions.php(144): PPFrame_Hash->expand(PPNode_Hash_Tree)
#4 /../w/includes/parser/Parser.php(3626): MediaWiki\Extensions\ParserFunctions\ParserFunctions::ifeq(Parser, PPTemplateFrame_Hash, array)
#5 /../w/includes/parser/Parser.php(3332): Parser->callParserFunction(PPTemplateFrame_Hash, string, array)
#6 /../w/includes/parser/PPFrame_Hash.php(254): Parser->braceSubstitution(array, PPTemplateFrame_Hash)
#7 /../w/includes/parser/Parser.php(3508): PPFrame_Hash->expand(PPNode_Hash_Tree)
#8 /../w/includes/parser/PPFrame_Hash.php(254): Parser->braceSubstitution(array, PPFrame_Hash)
#9 /../w/includes/parser/Parser.php(3146): PPFrame_Hash->expand(PPNode_Hash_Tree, integer)
#10 /../w/includes/parser/Parser.php(1464): Parser->replaceVariables(string)
#11 /../w/includes/parser/Parser.php(589): Parser->internalParse(string)
#12 /../w/includes/content/WikitextContent.php(368): Parser->parse(string, Title, ParserOptions, boolean, boolean, integer)
#13 /../w/includes/content/AbstractContent.php(555): WikitextContent->fillParserOutput(Title, integer, ParserOptions, boolean, ParserOutput)
#14 /../w/includes/Revision/RenderedRevision.php(267): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)
#15 /../w/includes/Revision/RenderedRevision.php(236): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)
#16 /../w/includes/Revision/RevisionRenderer.php(215): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string)
#17 /../w/includes/Revision/RevisionRenderer.php(152): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)
#18 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)
#19 /../w/includes/Revision/RenderedRevision.php(198): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)
#20 /../w/includes/poolcounter/PoolWorkArticleView.php(196): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()
#21 /../w/includes/poolcounter/PoolCounterWork.php(125): PoolWorkArticleView->doWork()
#22 /../w/includes/page/Article.php(791): PoolCounterWork->execute()
#23 /../w/includes/actions/ViewAction.php(63): Article->view()
#24 /../w/includes/MediaWiki.php(511): ViewAction->show()
#25 /../w/includes/MediaWiki.php(302): MediaWiki->performAction(Article, Title)
#26 /../w/includes/MediaWiki.php(900): MediaWiki->performRequest()
#27 /../w/includes/MediaWiki.php(527): MediaWiki->main()
#28 /../w/index.php(44): MediaWiki->run()
#29 {main}

Event Timeline

@MGChecker I have the feeling that this is related to converting this extension to extension registration. Since you authored this change ... Please excuse me for pinging you if I am wrong in both cases. This is just and "admin feeling" in the end.

Reedy subscribed.

Run composer?

Run composer?

Yes, but why? There is no reference in composer.local.json to this extension.

Run composer?

Yes, but why? There is no reference in composer.local.json to this extension.

Composer.local.json is something specific to your setup. It won't automatically just get changed

It's there in https://github.com/wikimedia/mediawiki-extensions-Widgets/blob/master/composer.json#L3

Well the past 10 years I cloned in smarty. Something like this really gives me the creeps since it complicates my setup. In the end however this is another case of failed documentation. Will work on this once I get around it. Anyways thanks for the help. The solution was indeed adding this extension to the extra section in "composer.local.json"

Well the past 10 years I cloned in smarty. Something like this really gives me the creeps since it complicates my setup. In the end however this is another case of failed documentation. Will work on this once I get around it. Anyways thanks for the help. The solution was indeed adding this extension to the extra section in "composer.local.json"

Docs look up to date to me https://www.mediawiki.org/wiki/Extension:Widgets#Installation

Furthermore, I do not really see how updating composer is more complicated than initializing a submodule. In the end, I consider the nuances of git submodules more troublesome than using the most common PHP dependency manager.