Extension talk:Lingo/2022

Error: Class 'Revision' not found

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


When I install Lingo (both manually and via composer), all of my pages experience a Fatal Exception.


/index.php?title=Main_Page Error: Class 'Revision' not found

Backtrace:

from /mediawiki-1.37.1/extensions/Lingo/src/BasicBackend.php(304)

#0 /mediawiki-1.37.1/extensions/Lingo/src/BasicBackend.php(250): Lingo\BasicBackend->getLatestRevisionFromTitle(Title)

#1 /mediawiki-1.37.1/extensions/Lingo/src/BasicBackend.php(202): Lingo\BasicBackend->getRevisionFromTitle(Title)

#2 /mediawiki-1.37.1/extensions/Lingo/src/BasicBackend.php(164): Lingo\BasicBackend->getRawDictionaryContent(Title)

#3 /mediawiki-1.37.1/extensions/Lingo/src/BasicBackend.php(78): Lingo\BasicBackend->collectDictionaryLines()

#4 /mediawiki-1.37.1/extensions/Lingo/src/LingoParser.php(186): Lingo\BasicBackend->next()

#5 /mediawiki-1.37.1/extensions/Lingo/src/LingoParser.php(159): Lingo\LingoParser->buildLingo()

#6 /mediawiki-1.37.1/extensions/Lingo/src/LingoParser.php(217): Lingo\LingoParser->getLingoTree()

#7 /mediawiki-1.37.1/extensions/Lingo/src/LingoParser.php(83): Lingo\LingoParser->realParse(DeprecatedGlobal)

#8 /mediawiki-1.37.1/extensions/Lingo/src/Lingo.php(53): Lingo\LingoParser->parse(DeprecatedGlobal)

#9 /mediawiki-1.37.1/includes/HookContainer/HookContainer.php(338): Lingo\Lingo::Lingo\{closure}(WikitextContent, Title, ParserOutput)

#10 /mediawiki-1.37.1/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook(string, array, array, array)

#11 /mediawiki-1.37.1/includes/HookContainer/HookRunner.php(1212): MediaWiki\HookContainer\HookContainer->run(string, array)

#12 /mediawiki-1.37.1/includes/content/AbstractContent.php(552): MediaWiki\HookContainer\HookRunner->onContentAlterParserOutput(WikitextContent, Title, ParserOutput)

#13 /mediawiki-1.37.1/includes/Revision/RenderedRevision.php(263): AbstractContent->getParserOutput(Title, integer, ParserOptions, boolean)

#14 /mediawiki-1.37.1/includes/Revision/RenderedRevision.php(235): MediaWiki\Revision\RenderedRevision->getSlotParserOutputUncached(WikitextContent, boolean)

#15 /mediawiki-1.37.1/includes/Revision/RevisionRenderer.php(217): MediaWiki\Revision\RenderedRevision->getSlotParserOutput(string, array)

#16 /mediawiki-1.37.1/includes/Revision/RevisionRenderer.php(154): MediaWiki\Revision\RevisionRenderer->combineSlotOutput(MediaWiki\Revision\RenderedRevision, array)

#17 [internal function]: MediaWiki\Revision\RevisionRenderer->MediaWiki\Revision\{closure}(MediaWiki\Revision\RenderedRevision, array)

#18 /mediawiki-1.37.1/includes/Revision/RenderedRevision.php(197): call_user_func(Closure, MediaWiki\Revision\RenderedRevision, array)

#19 /mediawiki-1.37.1/includes/poolcounter/PoolWorkArticleView.php(137): MediaWiki\Revision\RenderedRevision->getRevisionParserOutput()

#20 /mediawiki-1.37.1/includes/poolcounter/PoolCounterWork.php(162): PoolWorkArticleView->doWork()

#21 /mediawiki-1.37.1/includes/page/ParserOutputAccess.php(281): PoolCounterWork->execute()

#22 /mediawiki-1.37.1/includes/page/Article.php(691): MediaWiki\Page\ParserOutputAccess->getParserOutput(WikiPage, ParserOptions, MediaWiki\Revision\RevisionStoreRecord, integer)

#23 /mediawiki-1.37.1/includes/page/Article.php(506): Article->generateContentOutput(User, ParserOptions, integer, OutputPage, array)

#24 /mediawiki-1.37.1/includes/actions/ViewAction.php(80): Article->view()

#25 /mediawiki-1.37.1/includes/MediaWiki.php(543): ViewAction->show()

#26 /mediawiki-1.37.1/includes/MediaWiki.php(320): MediaWiki->performAction(Article, Title)

#27 /mediawiki-1.37.1/includes/MediaWiki.php(930): MediaWiki->performRequest()

#28 /mediawiki-1.37.1/includes/MediaWiki.php(564): MediaWiki->main()

#29 /mediawiki-1.37.1/index.php(53): MediaWiki->run()

#30 /mediawiki-1.37.1/index.php(46): wfIndexMain()

#31 {main} 63.155.89.242 (talk) 00:39, 27 January 2022 (UTC)

Revision.php was removed in 1.37. Izno (talk) 08:54, 27 January 2022 (UTC)
You should use the version proposed for 1.37, see the link 'Download extension' in the infobox of Extension:Lingo (or this direct link). ~ Seb35 [^_^] 11:39, 15 February 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Bug: The extension don't "see" all the terms

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


I instaled Lingo and added two terms the first time to my Terminology page, and all went fine. But when i tried to add more terms, they don't work, it seems as if the extension just doesn't see them. I tried deleting the content of the page and even removing and reinstalling the extension and nothing happens. What can I do? ChofisDan (talk) 03:35, 4 February 2022 (UTC)

Perhaps there is a syntax mistake on the Terminology page? Could you verify? and if you don’t find any error, copy here a minimal Terminology page with the issue and/or give a link if it is a public wiki. ~ Seb35 [^_^] 11:44, 15 February 2022 (UTC)
Also, I see Lingo does not support difference of case (see phabricator:T123961), so for instance if you enter the definition
Bug
A default in a software
The word « bug » will not be highlighted by Lingo since the definition has a capital "B". ~ Seb35 [^_^] 11:49, 15 February 2022 (UTC)
The terms I entered are always written in lowercase in the articles, that is, exactly as they are in the Terminology page. I followed the syntax as it was on the extension's page here on the MediaWiki. Here's my terminology page. ChofisDan (talk) 20:21, 15 February 2022 (UTC)
I was not able to reproduce the issue on a test wiki (MW 1.37.1 + your Lingo version 74e31cc indicated in Special:Version), but given you customized the Lingo terminology page, did you change accordingly the parameter $wgexLingoPage to MediaWiki:Lingo-Terminología (NB the "ex" after "wg", it’s unusual for a MW setting) in LocalSettings.php? ~ Seb35 [^_^] 09:59, 16 February 2022 (UTC)
No, I didn't change any parameter. I only checked in MediaWiki:Lingo-terminologypagename to know the name that the page should have, since my wiki's language is Spanish. ChofisDan (talk) 22:10, 16 February 2022 (UTC)
This is perhaps the issue: by default the page for terminology is Terminología; if you want to use MediaWiki:Lingo-Terminología instead, it is possible but you have to set $wgexLingoPage = "MediaWiki:Lingo-Terminología"; in the file LocalSettings.php. ~ Seb35 [^_^] 23:41, 16 February 2022 (UTC)
You're right!! I moved the content of MediaWiki:Lingo-Terminología to Terminología, and tho it's kind of annoying having that page in the main namespace, it worked! Thank you so much! ChofisDan (talk) 00:06, 17 February 2022 (UTC)
I’m glad it works. I close the topic. ~ Seb35 [^_^] 15:56, 17 February 2022 (UTC)
This same issue has happened to me.
I am running a local private mediawiki and SOME terms are not "working". i.e. no tool tip is displayed.
!Product
!Version
|-
|MediaWiki
|1.37.0
|-
|PHP
|8.1.2 (apache2handler)
|-
|MariaDB
|10.4.22-MariaDB
|-
|ICU
|70.1
|-
|Lingo
|3.1.2
|}
Tried with Terminology page and specifying a "Glossary" page in settings.
Any ideas?
SG GobleStL (talk) 14:14, 26 April 2022 (UTC)
@GobleStL Please check if this helps Extension talk:Lingo/2023#h-Not_showing_tooltip_for_specific_cases-20230123203700 Elcapitan68 (talk) 11:58, 21 February 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

HALP! Fatal exception of type "Error"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Was a big fan of "Terminology" and cannot for the life of me get this new one working with my old page. Created a new page called "Glossary" and specifying it in the settings but no matter what I get the aforementioned error. GobleStL (talk) 20:02, 14 April 2022 (UTC)
Installing these Lingo files and choosing 1.37 fixed this issue:
Special:ExtensionDistributor/Lingo GobleStL (talk) 08:24, 24 April 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Addition of new terms or making changes in existing is not reflecting

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Whenever i tried to add new terms or making changes in existing lingo terms, those changes are not reflecting on my media wiki pages but i could see the terms i added is reflecting on my terminology page. Can anyone help on this issue ? Boopalag (talk) 05:30, 17 May 2022 (UTC)
@Boopalag, can you share screen shorts of expected and actual behavior and the version of Lingo you're running including the version of MediaWiki? X-Savitar (talk) 12:13, 5 June 2022 (UTC)
Hi X-Savitar, Thanks a lot for response, Now the issue is little different.
Actually we are able to see the tooltip but there is a delay for the tooltip to be visible after a new Glossary term is added (approx 4-7 days delay). Sometimes its reflecting within a day and sometimes after a week (there is no uniform pattern).
Any suggestions to make the tooltip visible immediately after a new term is added?
Mediawiki - 1.35.3 with the Lingo version - 3.1.1 (8ae42ff) Boopalag (talk) 05:07, 15 June 2022 (UTC)
We'll see if we can reproduce this. Ike Hecht 16:04, 28 July 2022 (UTC)
We're guessing that this was caused by the old tooltip being stuck in your parser cache. To avoid this, check Manual:$wgInvalidateCacheOnLocalSettingsChange and Manual:$wgCacheEpoch then touch (save) your LocalSettings.php file. Please let us know if that solves your issue. Ike Hecht 19:04, 8 August 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Way to work with first word, regardless of capitalization?

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Hello, This extension works great as a form of dictionary for my site. However, is there a way where I can have it work in a way of regardless of how a word is capitalized it only counts that as the "first" instance? For instance, imagine I have the following: ;Madeupword :This word is made up. If I wanted this to work on both MadeUpWord and madeupword, I have to add them both as separate words following semicolons. However, this is counter-intuitive to the option for only showing the glossary on the first instance of a word. Zaksquatch (talk) 15:09, 11 August 2022 (UTC)
@Zaksquatch Please, note the extension description: It lets you define a list of abbreviations and their definitions on a page and then displays these definitions whenever an abbreviation is hovered over in an article.
Since it deals with abbreviations, it is case sensitive and, by design, doesn't expect different letter cases for the same abbreviation.
Simple case shift will not solve the problem universally, as there can exist a mixed case terms (eg. "aBC" and "AbC"), etc.
Also please, look at the comment by the previous maintainer.
In your case, setting $GLOBALS['wgexLingoDisplayOnce'] = true; might help to remove the "counter-intuitive" effect, but of course, would add some clutter. Elcapitan68 (talk) 14:56, 12 August 2022 (UTC)
Yeah, I understand I'm using the extension for something a little different than it was intended to be used for. It was the best tool I could find for the job however! I am fine if there isn't a way around it, it was merely a question of curiosity.
Thank you for the response! Zaksquatch (talk) 15:56, 12 August 2022 (UTC)
@Zaksquatch you are welcome! Elcapitan68 (talk) 16:31, 18 August 2022 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Deprecation Message in 1.39

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Deprecated: Use of Parser::$mDoubleUnderscores was deprecated in MediaWiki 1.35. [Called from Lingo\LingoParser::shouldParse in ..\mediawiki\extensions\Lingo\src\LingoParser.php at line 391] I'm currently upgrading MW from 1.35 to 1.39 and now receive this deprecation notice. Will this be fixed in time for the stable release? THL DK (talk) 17:06, 30 November 2022 (UTC)
There is a patch in progress to fix this. Ike Hecht 23:42, 5 December 2022 (UTC)
The lastest patch has been merged, can you test it with the patch merged (master) and let me know if you still face this issue? X-Savitar (talk) 15:01, 6 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Fatal exception of type "Error"

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

Turning on error reporting show the below.
Product Version
MediaWiki 1.39.0
PHP 8.1.13 (apache2handler)
Lingo 3.1.1
PHP Caching
APCu Support Enabled
Version 5.1.21
APCu Debugging Disabled
MMAP Support Enabled
MMAP File Mask no value
Serialization Support php
Build Date Jun 25 2022 07:29:23
MediaViewer also has issues and has been disabled so direct viewing of images is fine. But with Lingo I get this: [d2bd7de25bc67f629e3a1d49] /mediawiki/index.php?title=Glossary&action=submit Error: Call to undefined function Lingo\wfGetMainCache() Backtrace: from /var/www/html/mediawiki/extensions/Lingo/src/LingoParser.php(387) #0 /var/www/html/mediawiki/extensions/Lingo/src/BasicBackend.php(262): Lingo\LingoParser->purgeGlossaryFromCache() #1 /var/www/html/mediawiki/includes/HookContainer/HookContainer.php(338): Lingo\BasicBackend->purgeCache() #2 /var/www/html/mediawiki/includes/HookContainer/HookContainer.php(137): MediaWiki\HookContainer\HookContainer->callLegacyHook() #3 /var/www/html/mediawiki/includes/HookContainer/HookRunner.php(2732): MediaWiki\HookContainer\HookContainer->run() #4 /var/www/html/mediawiki/includes/Storage/PageUpdater.php(913): MediaWiki\HookContainer\HookRunner->onPageContentSave() #5 /var/www/html/mediawiki/includes/EditPage.php(2596): MediaWiki\Storage\PageUpdater->saveRevision() #6 /var/www/html/mediawiki/includes/EditPage.php(1904): EditPage->internalAttemptSave() #7 /var/www/html/mediawiki/includes/EditPage.php(721): EditPage->attemptSave() #8 /var/www/html/mediawiki/includes/actions/EditAction.php(73): EditPage->edit() #9 /var/www/html/mediawiki/includes/actions/SubmitAction.php(38): EditAction->show() #10 /var/www/html/mediawiki/includes/MediaWiki.php(542): SubmitAction->show() #11 /var/www/html/mediawiki/includes/MediaWiki.php(322): MediaWiki->performAction() #12 /var/www/html/mediawiki/includes/MediaWiki.php(904): MediaWiki->performRequest() #13 /var/www/html/mediawiki/includes/MediaWiki.php(562): MediaWiki->main() #14 /var/www/html/mediawiki/index.php(50): MediaWiki->run() #15 /var/www/html/mediawiki/index.php(46): wfIndexMain() #16 {main} ¯\_(ツ)_/¯ Everything else seems good. This is a fresh build with the aforementioned versions. Any ideas? SG GobleStL (talk) 22:17, 4 December 2022 (UTC)
Thank you for your report, we're working on 1.39 compatibility and the issue should have an update soon. Elcapitan68 (talk) 12:07, 8 December 2022 (UTC)
THANK YOU! GobleStL (talk) 06:19, 9 December 2022 (UTC)
The lastest patch has been merged, can you test it with the patch merged (master) and let me know if you still face this issue? X-Savitar (talk) 15:01, 6 January 2023 (UTC)
THANKS! I will check as soon as I can. GobleStL (talk) 15:34, 11 January 2023 (UTC)
This works for me. No issues. GobleStL (talk) 21:41, 14 January 2023 (UTC)
Nice! Thanks for reporting the issue. I'll go ahead and resolve this topic now. X-Savitar (talk) 06:45, 19 January 2023 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.