Page MenuHomePhabricator

Error from line 213 of extensions/Lingo/src/BasicBackend.php: Call to undefined method WikitextContent::getText()
Closed, ResolvedPublic

Description

Hello,

I've just added Lingo to a MW installation (version 1.31.1). The language of all articles is Bulgarian. Definitions have been added to the default Terminology page. However, when accessing a page where a term is present, the following message appears:

[XchFeq39BvPAvVkt0om0aQAAAA8] /%D0%9D%D0%B0%D1%87%D0%B0%D0%BB%D0%BD%D0%B0_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 Error from line 213 of /home/user/wiki/extensions/Lingo/src/BasicBackend.php: Call to undefined method WikitextContent::getText()

Backtrace:

#0 /home/user/wiki/extensions/Lingo/src/BasicBackend.php(164): Lingo\BasicBackend->getRawDictionaryContent(Title)
#1 /home/user/wiki/extensions/Lingo/src/BasicBackend.php(78): Lingo\BasicBackend->collectDictionaryLines()
#2 /home/user/wiki/extensions/Lingo/src/LingoParser.php(186): Lingo\BasicBackend->next()
#3 /home/user/wiki/extensions/Lingo/src/LingoParser.php(159): Lingo\LingoParser->buildLingo()
#4 /home/user/wiki/extensions/Lingo/src/LingoParser.php(217): Lingo\LingoParser->getLingoTree()
#5 /home/user/wiki/extensions/Lingo/src/LingoParser.php(83): Lingo\LingoParser->realParse(Parser)
#6 /home/user/wiki/extensions/Lingo/src/Lingo.php(53): Lingo\LingoParser->parse(Parser)
#7 /home/user/wiki/includes/Hooks.php(177): Lingo\Lingo::Lingo\{closure}(WikitextContent, Title, ParserOutput)
#8 /home/user/wiki/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#9 /home/user/wiki/includes/content/AbstractContent.php(520): Hooks::run(string, array)
#10 /home/user/wiki/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#11 /home/user/wiki/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#12 /home/user/wiki/includes/page/Article.php(604): PoolCounterWork->execute()
#13 /home/user/wiki/includes/actions/ViewAction.php(68): Article->view()
#14 /home/user/wiki/includes/MediaWiki.php(500): ViewAction->show()
#15 /home/user/wiki/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#16 /home/user/wiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#17 /home/user/wiki/includes/MediaWiki.php(524): MediaWiki->main()
#18 /home/user/wiki/index.php(42): MediaWiki->run()
#19 {main}

In the past I used Lingo on an older MW installation with the very same database and the same terminology page with no issues.

Could you help me figure out what's causing this behaviour, please?

Thanks!

Event Timeline

Bozla created this task.Nov 9 2019, 1:28 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 9 2019, 1:28 PM
Urbanecm removed Foxtrott as the assignee of this task.Nov 9 2019, 4:53 PM
Urbanecm added a subscriber: Foxtrott.
Urbanecm added a subscriber: Urbanecm.EditedNov 9 2019, 4:55 PM

Please share the full stacktrace. You can find it in your server logs.

Bozla added a comment.Nov 10 2019, 5:10 PM

Hello,
Unfortunately MW is on a shared hosting and I don't have access to the error logs. What exactly do you need, so that I can request it from the support team?

Bozla added a comment.Nov 10 2019, 5:17 PM

OK, so I enabled debugging and here's what I got. Does it help in any way?

[XchFeq39BvPAvVkt0om0aQAAAA8] /%D0%9D%D0%B0%D1%87%D0%B0%D0%BB%D0%BD%D0%B0_%D1%81%D1%82%D1%80%D0%B0%D0%BD%D0%B8%D1%86%D0%B0 Error from line 213 of /home/user/wiki/extensions/Lingo/src/BasicBackend.php: Call to undefined method WikitextContent::getText()

Backtrace:

#0 /home/user/wiki/extensions/Lingo/src/BasicBackend.php(164): Lingo\BasicBackend->getRawDictionaryContent(Title)
#1 /home/user/wiki/extensions/Lingo/src/BasicBackend.php(78): Lingo\BasicBackend->collectDictionaryLines()
#2 /home/user/wiki/extensions/Lingo/src/LingoParser.php(186): Lingo\BasicBackend->next()
#3 /home/user/wiki/extensions/Lingo/src/LingoParser.php(159): Lingo\LingoParser->buildLingo()
#4 /home/user/wiki/extensions/Lingo/src/LingoParser.php(217): Lingo\LingoParser->getLingoTree()
#5 /home/user/wiki/extensions/Lingo/src/LingoParser.php(83): Lingo\LingoParser->realParse(Parser)
#6 /home/user/wiki/extensions/Lingo/src/Lingo.php(53): Lingo\LingoParser->parse(Parser)
#7 /home/user/wiki/includes/Hooks.php(177): Lingo\Lingo::Lingo\{closure}(WikitextContent, Title, ParserOutput)
#8 /home/user/wiki/includes/Hooks.php(205): Hooks::callHook(string, array, array, NULL)
#9 /home/user/wiki/includes/content/AbstractContent.php(520): Hooks::run(string, array)
#10 /home/user/wiki/includes/poolcounter/PoolWorkArticleView.php(144): AbstractContent->getParserOutput(Title, integer, ParserOptions)
#11 /home/user/wiki/includes/poolcounter/PoolCounterWork.php(123): PoolWorkArticleView->doWork()
#12 /home/user/wiki/includes/page/Article.php(604): PoolCounterWork->execute()
#13 /home/user/wiki/includes/actions/ViewAction.php(68): Article->view()
#14 /home/user/wiki/includes/MediaWiki.php(500): ViewAction->show()
#15 /home/user/wiki/includes/MediaWiki.php(294): MediaWiki->performAction(Article, Title)
#16 /home/user/wiki/includes/MediaWiki.php(861): MediaWiki->performRequest()
#17 /home/user/wiki/includes/MediaWiki.php(524): MediaWiki->main()
#18 /home/user/wiki/index.php(42): MediaWiki->run()
#19 {main}

Yup, that's exactly what's needed :-).

Urbanecm renamed this task from Fatal exception of type "Error" to Error from line 213 of extensions/Lingo/src/BasicBackend.php: Call to undefined method WikitextContent::getText().Nov 10 2019, 6:01 PM
Urbanecm updated the task description. (Show Details)

Problem is that Lingo 3.1 uses getText(), which is not available in MW 1.31 yet. Your best bet right now is to downgrade to Lingo 3.0 (or upgrade MW)

Bozla added a comment.Nov 11 2019, 5:14 PM

Thank you very much, @Foxtrott ! I've updated to MW 1.33 and Lingo seem to be working fine right now.

Urbanecm closed this task as Invalid.Nov 11 2019, 7:02 PM
Foxtrott reopened this task as Open.Nov 11 2019, 9:17 PM

Reopening: Lingo uses compatibility policy master. Current supported MW versions are 1.31+.

Change 550369 had a related patch set uploaded (by Foxtrott; owner: Foxtrott):
[mediawiki/extensions/Lingo@master] Fix T237806: Reintroduce deprecated function call for older MW

https://gerrit.wikimedia.org/r/550369

Change 550369 merged by Foxtrott:
[mediawiki/extensions/Lingo@master] Fix T237806: Reintroduce deprecated function call for older MW

https://gerrit.wikimedia.org/r/550369

Can this be now closed, @Foxtrott ?

Foxtrott closed this task as Resolved.Nov 11 2019, 10:23 PM
Foxtrott claimed this task.

Yes. :)