Extension talk:Lingo/2016

Warning: OutputPage::getModuleStyles: style module should define its position explicitly: ext.Lingo.Styles ResourceLoaderFileModule

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 have upgraded to mediawiki 1.26.2

I'm seeing this issue

Warning: OutputPage::getModuleStyles: style module should define its position explicitly: ext.Lingo.Styles ResourceLoaderFileModule [Called from OutputPage::getModuleStyles in /app/mediawiki/mw/includes/OutputPage.php at line 623] in/app/mediawiki/mw/includes/debug/MWDebug.php on line 300 Legaulph (talk) 16:24, 14 January 2016 (UTC)

OK I think I fixed it
I updated Lingo.php with 'position' => 'top',
<code>
$resourceModules = array(
                        'ext.Lingo.Styles'  => array(
                                        'position' => 'top',
                                        'localBasePath' => $dir,
                                        'remoteExtPath' => 'Lingo',
                                        'styles'        => 'skins/Lingo.css',
                        ),
                        'ext.Lingo.Scripts' => array(
                                        'position' => 'top',
                                        'localBasePath' => $dir,
                                        'remoteExtPath' => 'Lingo',
                                        'scripts'       => 'libs/Lingo.js',
                                        'dependencies'  => 'ext.jquery.qtip',
                        ),
                        'ext.jquery.qtip'   => array(
                                        'position' => 'top',
                                        'localBasePath' => $dir,
                                        'remoteExtPath' => 'Lingo',
                                        'scripts'       => 'libs/jquery.qtip.js',
                                        'styles'        => 'skins/jquery.qtip.css',
                        ),
</code> Legaulph (talk) 01:46, 15 January 2016 (UTC)
Actually, you just need the
'position' => 'top',
line in the ext.Lingo.Styles stanza Greg Rundlett (talk) 16:12, 22 January 2016 (UTC)
^^ This was merged into master Greg Rundlett (talk) 22:19, 22 January 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Fatal error with Lingo 2.0

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 have upgraded to mediawiki 1.26.2

I'm seeing this issue

Fatal error: Lingo\LingoParser::realParse(): The script tried to execute a method or access a property of an incomplete object. Please ensure that the class definition &quot;LingoTree&quot; of the object you are trying to operate on was loaded _before_ unserialize() gets called or provide a __autoload() function to load the class definition in /srv/www/scoutwiki/extensions/Lingo/src/LingoParser.php on line 220 Egel (talk) 12:22, 12 March 2016 (UTC)

It's a cache issue, I think. Try running php purgeParserCache.php --age 0 from the maintenance directory (/srv/www/scoutwiki/maintenance). F.trott (talk) 12:35, 12 March 2016 (UTC)
Running that script didn't help. Egel (talk) 16:35, 12 March 2016 (UTC)
Just to make sure we are on the right track, could you add $wgexLingoCacheType = CACHE_NONE; to LocalSettings.php? F.trott (talk) 16:45, 12 March 2016 (UTC)
I just released Lingo 2.0.1, that should fix this. F.trott (talk) 19:59, 12 March 2016 (UTC)
That helped. Lingo 2.0 works now, but Semantic Glossary 2.0 doesn't. We had problems with cache, Redis didn't work anymore, so we have $wgMainCacheType = CACHE_ANYTHING. Egel (talk) 20:12, 12 March 2016 (UTC)
Do you have a link? F.trott (talk) 20:37, 12 March 2016 (UTC)
https://nl.scoutwiki.org/Afkortingen doesn't and https://nl.scoutwiki.org/Terminologie does work. Egel (talk) 21:10, 12 March 2016 (UTC)
Make sure that in your LocalSettings you have a call to wfLoadExtension('SemanticGlossary');.
A call to wfLoadExtension('Lingo'); is not necessary (and may cause problems). F.trott (talk) 22:08, 12 March 2016 (UTC)
A call to wfLoadExtension('Lingo'); is needed to load Lingo, wfLoadExtension('SemanticGlossary'); doesn't also load Lingo. SemanticGlossary gives this warning PHP Warning: call_user_func() expects parameter 1 to be a valid callback, class 'SemanticGlossary' not found in /srv/www/scoutwiki/mediawiki-1.26.2/includes/registration/ExtensionRegistry.php on line 269 Egel (talk) 11:51, 14 March 2016 (UTC)
Makes sense. Class SemanticGlossary is responsible for loading Lingo. If the class is not found, Lingo is not loaded.
It seems that for some reason the SemanticGlossary class was not added to the autoloader by Composer. Did you install the extension as described in the installation instructions? F.trott (talk) 12:16, 14 March 2016 (UTC)
nl.scoutwiki.org is part of a farm with shared code. nl.scoutwiki.org is the only one using Semantic Glossary, so we try to avoid the Composer autoloader. It looks like the autoloader adds something like require_once "$IP/extensions/SemanticGlossary/SemanticGlossary.php";, when I add that line to LocalSettings.php and remove wfLoadExtension('Lingo'); Lingo gets loaded and works but Semantic Glossary doesn't work. Egel (talk) 08:01, 15 March 2016 (UTC)
This will not work. Semantic Glossary needs to be installed using Composer. Composer provides the autoloader responsible for loading all the classes. Adding require_once "$IP/extensions/SemanticGlossary/SemanticGlossary.php"; to LocalSettings.php will load this one file, but not the others. F.trott (talk) 08:10, 15 March 2016 (UTC)
I have both require_once "$IP/extensions/SemanticGlossary/SemanticGlossary.php"; and wfLoadExtension('SemanticGlossary'); added to LocalSettings.php.
Most glossary terms were defined on one page as Internal Objects. I have changed those to subobjects with an unique identifier and now SemanticGlossary works too.
http://nl.scoutwiki.org/index.php?title=Sjabloon%3AAfkorting&type=revision&diff=86303&oldid=86297
Thanks Egel (talk) 09:24, 15 March 2016 (UTC)
If it works, great and nothing wrong with that!
However, for the benefit of future readers I should notice that this solution only works in this very special case, where the autoloader created by Composer is still in place from when SG 1.x was installed. By chance it continues to work for most of the files of SG 2.0. The one file where it does not work is taken care of by the require_once. This may or may not break with any further update. F.trott (talk) 14:42, 15 March 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

How to not process text on special:recentchanges

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.

I am running mediawiki 1.26.3, Lingo 2.0.1. My recent changes is picking up some definitions and I want to omit that page from being parsed my Lingo. I looked at /wiki/includes/specials/SpecialRecentchanges.php but I'm not sure where I would insert the span class "<span class="noglossary">"

I added $wgexLingoUseNamespaces[Special] = false; to my LocalSettings.php and my recent changes page is still parsing the definition.

Can you please help me understand how to omit the recent changes page from being parsed by Lingo?

Thank you Billmackenty (talk) 11:25, 4 July 2016 (UTC)

Hi.
$wgexLingoUseNamespaces[NS_SPECIAL] = false; should work.
Cheers F.trott (talk) 11:43, 4 July 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Can not save user options when i use Lingo 2.0.2

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.


Hallo.

I have a problem with saving my account user options when the extension Lingo is enable. I have updated my Mediawiki on 1.27.1. Additionally i have updated all used extension's also Lingo.

So i will edit my account user option and click to save all Parameters go back to the default value. If Lingo disable in the LocalSettings.php i can save every changes i've made. I've also tested Lingo 2.0.0 but it's the same effect.

I've tested the old Version 1.2.0 of Lingo and the user option works properly.

All other function's like browse pages, edit pages, view special pages and so on are okay.

My environment:

PHP 5.6.3

MySQL 5.6.21

Mediawiki 1.27.1

used extension's:

Lingo 2.0.2

Cite (bundled)

ImageMap (bundled)

pChart4mw 1.4.0

SyntaxHighlight 1.0.8.11 Fiedwhs (talk) 16:04, 29 September 2016 (UTC)

Thanks for the report. I'll have a look. F.trott (talk) 21:55, 5 October 2016 (UTC)
I had this problem too and it took me a long time to figure out. Please fix! Sophivorus (talk) 22:32, 29 November 2016 (UTC)
Sorry about this and I'm afraid I don't have enough time to investigate this right now.
As an interim solution you could try to exclude the NS_SPECIAL namespace. See Extension:Lingo#Customization ($wgexLingoUseNamespaces). F.trott (talk) 09:18, 1 December 2016 (UTC)
Just tried this with MW 1.27.1 and Lingo 2.0.2-dev (latest master actually). No problems. F.trott (talk) 22:16, 19 December 2016 (UTC)
We have the same problem with Lingo 2.0.1 and setting $GLOBALS['wgexLingoUseNamespaces'][NS_SPECIAL] = false; didn't solve it. Putting __NOGLOSSARY__ in MediaWiki:Preferences-summary didn't fix it either. Egel (talk) 16:26, 3 May 2017 (UTC)
Do you get any JavaScript errors? F.trott (talk) 20:30, 3 May 2017 (UTC)
No JavaScript errors or other error messages are displayed. 5.97.176.194 (talk) 12:14, 9 May 2017 (UTC)
You could try getting more error messages by turning error reporting on: Manual:How_to_debug#PHP_errors.
Also, is this on a public wiki where I could get an account and see the problem myself?
Without seeing the problem (or getting any lead) I can't do anything. When I try it on a local wiki I have no problems. :( F.trott (talk) 12:20, 9 May 2017 (UTC)
I think I fixed this in Lingo 2.0.3. It would be great if you could check and confirm. F.trott (talk) 23:43, 23 May 2017 (UTC)
I also observed this error running MW 1.27.3, PHP 7.0.11, and a Lingo 2.0.2-version (the one currently provided by the REL1_27 version on the Extension Distributor - commit 66da4b0)
Updating to Lingo 2.0.3 resolves the problem for a test instance of my site. Unfortunately we need a REL1_27 version to go into production. Could you backport the relevant fixes? 130.76.24.20 (talk) 02:24, 15 August 2017 (UTC)
This was fixed 3 months ago in Lingo 2.0.3. Please upgrade. Cheers. F.trott (talk) 03:48, 15 August 2017 (UTC)
The extension distributor is more or less useless for any extension not provided by the WMF. Lingo 2.0.3 should be compatible with MediaWiki 1.26 or later. F.trott (talk) 03:51, 15 August 2017 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

Install Lingo with Composer

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.


MediaWiki 1.28.0 I install lingo with composer and it gives an error require justinrainbow/json-schema 1.0 and mediawik composer.json file has under require-dev justinrainbow/json-schema 3.0. I remove that and install the 1.0 version under require. lingo and glossary install but do not show up in the Special:Version. "mediawiki/lingo" : "~2.0", "mediawiki/semantic-glossary": "~2.0", "justinrainbow/json-schema" : "~1.0",

Is there something I'm missing? Legaulph (talk) 12:05, 14 December 2016 (UTC)

See https://www.mediawiki.org/wiki/Extension:Lingo#Common_steps:_Activation:
Add to the end of LocalSettings.php:
wfLoadExtension('Lingo');
F.trott (talk) 12:09, 14 December 2016 (UTC)
When I do it blows up the Special:Version page Legaulph (talk) 12:32, 14 December 2016 (UTC)
Its the semantic-glossary not Lingo
Thanks Legaulph (talk) 12:35, 14 December 2016 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.

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.


Is there anyway to get a link to work in a MediaWiki Lingo tooltip? Ideally we want to add a link to more info (a Wikipedia link) Helpware (talk) 03:26, 30 December 2016 (UTC)

You could use Semantic Glossary. Don't know if it's worth the effort.
The only other way would be to use a custom backend. F.trott (talk) 16:26, 1 January 2017 (UTC)
I've done a small mod on Lingo.js to convert mediawiki [xxx] type markup to <a> HTML
Now links work perfectly.
Details here if others want the fix
http://helminthictherapywiki.org/wiki/index.php/Wiki:Notes_lingo Helpware (talk) 01:29, 17 February 2017 (UTC)
The discussion above is closed. Please do not modify it. No further edits should be made to this discussion.