Extension talk:Scribunto

Jump to navigation Jump to search

About this board

  • This page uses "Structured Discussions".
  • It has most recently started discussions at the top.
  • The page loads dynamically, meaning you can't tell how much more you will see when you scroll down
Sachinpatel393 (talkcontribs)

hello,


from how can i get total pages numbers, and it seems it not works for us, becuase we are added many pages, but in statistic it show much less pages,


so let us know how to fix or debug this issue.


thanks

Reply to "pages counter"
Sachinpatel393 (talkcontribs)

hello,

seems our page counter not working properly, how can we verify or fixed the count issue of pages?

in screenshot you can see there is pages count i.e 213. it seems wrong count. there are more then 600 pages

please check attch screenshot and let us know.

thanks.

Reply to "page count at sign up page"

After update to mediawiki 1.35.1 "Script error: No such module "Category"."

2
Wuestenarchitekten (talkcontribs)

I'm not sure what other information I can provide but the Module:Category exists and I also tried adding a new test module - none of them are found.

Not sure if I missed a step when upgrading mediawiki? Thanks!

Wuestenarchitekten (talkcontribs)

I believe this was multiple things together: php update and mediawiki update. Also forgot to set the lua folders permissions...

Lua error: Internal error: The interpreter exited with status "-129"

2
2A02:A03F:66C4:7200:AC2B:7A50:7292:74DE (talkcontribs)

Hello !

I have this error when I want to import a Module on my own Wiki. I followed all the steps, and even look after commons error, but I haven't find something.

2A02:A03F:66C4:7200:6CE7:2808:43C0:DA9B (talkcontribs)

Hi ! I'ts me again (Writing from another computer !).

I have forgotten to make some precision on the subject.

I work on the Mediawiki 1.31.12 and Scribunto – (106fbf4) 15 mai 2018 à 16:24 is installed. Not sure that it helps.


I get this error when i want to import valide code from Wikipedia to my own Wiki. I've look on the help section of the section, and trying everything i could to fix this. It's important because, my Infobox does not work without these, and i'm kind of embarased. If you need more information, let me know here !

Reply to "Lua error: Internal error: The interpreter exited with status "-129""

Erreur Lua : erreur interne : l’interpréteur s’est arrêté avec le signal « 11 ».

1
Romainluc (talkcontribs)

Bonjour,

Je viens d'installer récemment MediaWiki et je rencontre l'erreur 11 avec lua quand j'utilise les infobox...

Si vous pourriez m'aider à résoudre ce problème.

Merci !

Reply to "Erreur Lua : erreur interne : l’interpréteur s’est arrêté avec le signal « 11 »."

Lua error: bad argument #1 to "get" (not a valid title).

5
Wsdmatty (talkcontribs)

I have recently begun a quest to import Template:Quote to my wiki. This was not straightforward and took a lot more time than I anticipated. However, through trial and error and muddling my way through extension installations, I have finally got the template working.

However, Template:Documentation is giving me a Lua error. I don't know if it's mental fatigue or my brain has just given up, but i can't figure out what the actual problem is. Any suggestions would be greatly appreciated.

BT:

Lua error: bad argument #1 to "get" (not a valid title).

Backtrace:

  1. (tail call): ?
  2. [C]: in function "error"
  3. MWServer.lua:81: ?
  4. (tail call): ?
  5. (tail call): ?
  6. Module:TNT:162: in function "loadData"
  7. Module:TNT:181: ?
  8. (tail call): ?
  9. (tail call): ?
  10. Module:Documentation/config:63: in function "init"
  11. package.lua:103: ?
  12. (tail call): ?
  13. mw.lua:486: in function "executeModule"
  14. mw.lua:762: in function "loadData"
  15. Module:Documentation:8: in function "chunk"
  16. mw.lua:486: ?
  17. (tail call): ?
  18. [C]: in function "xpcall"
  19. MWServer.lua:99: in function "handleCall"
  20. MWServer.lua:313: in function "dispatch"
  21. MWServer.lua:70: ?
  22. (tail call): ?
  23. (tail call): ?
  24. (tail call): ?
  25. mw.lua:511: ?
  26. (tail call): ?
  27. [C]: in function "xpcall"
  28. MWServer.lua:99: in function "handleCall"
  29. MWServer.lua:313: in function "dispatch"
  30. MWServer.lua:52: in function "execute"
  31. mw_main.lua:7: in main chunk
  32. [C]: ?


Tacsipacsi (talkcontribs)

Did you set JsonConfig up? The relevant parts from Wikimedia’s CommonSettings.php are:

// Safety: before extension.json, these values were initialized by JsonConfig.php
if ( !isset( $wgJsonConfigModels ) ) {
	$wgJsonConfigModels = [];
}
if ( !isset( $wgJsonConfigs ) ) {
	$wgJsonConfigs = [];
}

$wgJsonConfigEnableLuaSupport = true;

// https://www.mediawiki.org/wiki/Extension:JsonConfig#Configuration

$wgJsonConfigModels['Tabular.JsonConfig'] = 'JsonConfig\JCTabularContent';
$wgJsonConfigs['Tabular.JsonConfig'] = [
	'namespace' => 486,
	'nsName' => 'Data',
	// page name must end in ".tab", and contain at least one symbol
	'pattern' => '/.\.tab$/',
	'license' => 'CC0-1.0',
	'isLocal' => false,
];

// Enable Tabular data namespace on Commons - T148745
$wgJsonConfigInterwikiPrefix = 'commons';
$wgJsonConfigs['Tabular.JsonConfig']['remote'] = [
	'url' => 'https://commons.wikimedia.org/w/api.php'
];
Wsdmatty (talkcontribs)

Thank you very much for this. I had not set it up properly but this fixed my problem.

Odoxo (talkcontribs)

This took me an age to figure out, should be more prominent in the JsonConfig help section - thank you!

Sachinpatel393 (talkcontribs)

after copy above settings in localsettings.php

now getting this error:

Lua error in Module:Documentation at line 137: message: type error in message cfg.main-div-classes (string expected, got nil).

Reply to "Lua error: bad argument #1 to "get" (not a valid title)."

Language showcase about module translation

2
Aaharoni-WMF (talkcontribs)

Hi!

This Wednesday, August 26 at 12:00 UTC there will be an online meeting on the topic of localizing Scribunto Lua modules.

More about this event: mw:Wikimedia Language engineering/Showcase.

All editors are invited, especially all those who:

  • Develop modules and templates in any wiki, particularly the multilingual ones such as Wikidata, Commons, Meta, and mediawiki.org.
  • Translate software and pages using the Translate extension on translatewiki.net, Meta, mediawiki.org, etc., and manage translatable pages.

A little intro can be found at Phabricator task T238417, and much more information will be given at the meeting.

Thanks!

Aaharoni-WMF (talkcontribs)

Time change

I've been feeling very unwell today, and since I'm the main host and presenter in this meeting, I have to postpone this meeting to next week.

New time: Sep 2, 2020 02:00 PM UTC. Zoom link: https://wikimedia.zoom.us/j/95167235390

I am terribly sorry about the late notice and about the spam, but these circumstances are out of my control. Thanks for understanding, and I hope to see you at the new scheduled time! :)

Reply to "Language showcase about module translation"
Amire80 (talkcontribs)
Reply to "Global modules on Fandom"
ACastro24 (talkcontribs)

Hei everyone,

I want to create in bulk a number of new pages and append content to them, without having the user have to click readlinks.

I have been looking around, however I have not found a method for doing it.

If you could advise me on one, ideaily within a Scribunto module, it would be great.

Thank you

Mr. Stradivarius (talkcontribs)

The usual way of doing this kind of thing is through the API. However, Scribunto, by design, does not have access to the API, so you can't use it for things like bulk writing of pages. To make editing using the API easier, there are various tools for writing bots which you can look into, the most popular of which is probably Pywikibot.

ACastro24 (talkcontribs)

@Mr. Stradivarius Thank you. I am familiar with these operations via the API, but I want to avoid doing and keep all the operations within the wiki. It would be incredibly useful for Scribunto to have a method for creating pages and adding content to pages.

Mr. Stradivarius (talkcontribs)

The designers of Scribunto decided to not allow Scribunto scripts to make API calls, as this would create network traffic during the page save process, which has the potential to considerably increase the time taken to save a page. Scribunto was originally conceived as a way to make the page save process quicker, so I doubt that the devs would be open to adding API support.

If you want to use the API from within the wiki, how about adding a JavaScript gadget? This allows users to access the API from inside the browser. You can also make the gadget load by default, so your users won't have to activate it in their settings. There are already scripts that do mass page editing, such as JavaScript Wiki Browser. (In fact, you might just be able to use that script as it is, without installing it as a gadget.)

Mr. Stradivarius (talkcontribs)

The other option would be to install or create a MediaWiki extension. There might already be mass-page-creation extensions available, although I haven't checked.

ACastro24 (talkcontribs)

Thank you @Mr. Stradivarius. I understand the reasoning. But it is a frustrating not have a MW resouce, within the wiki, to create and add content to pages.

Your suggest of a JS gadget might be the best approach.

I n the meanwhile I found the Extension:Create Page, it is in Beta, but I will give a shot.

Thanks!

ACastro24 (talkcontribs)
Reply to "create pages"

Mediawiki Scribunto edit page timeout

4
88.134.41.99 (talkcontribs)

So, I have a Scribunto Module page named Module:X. Since I have a lot of functions I simply put everything on one page and accordingly the page is very long.

Yesterday I made some changes and added some code. I clicked on "Publish changes" and then, first the website froze and after a while, I got a 504 Gateway Time-out.

I tried changing the code in hopes of finding the problem and I think it has to do with its length. First I saw that the Error only occurred when the page was longer than 2100 lines. But then I deleted all comments and unnecessary linebreaks and the error occurred at around 1900 lines.

Has anyone experienced a similar problem or has an idea where it could come from?

Dinoguy1000 (talkcontribs)

So, I have a Scribunto Module page named Module:X. Since I have a lot of functions I simply put everything on one page and accordingly the page is very long.

Module:X sounds like it's doing way too much; in particular, you've made it sound like the module is responsible for completely unrelated features. Your first step here is going to be to refactor it into separate modules with logical responsibilities (for example, on Wikipedia, Module:Navbox is responsible for creating navboxes, while Module:Infobox is responsible for creating infoboxes). No one is going to be able to help you diagnose and correct any errors until you've done this (especially errors as vague as "I get a 504 Gateway Time-out if I have more than 1234 lines of code). You may find that the error goes away in the course of refactoring, too.

88.134.41.99 (talkcontribs)

Thanks, i already turned the module into 2 parts, importing each other. The problem is, that they are in fact not completely unrelated features, but functions, that are referenced by a lot of other functions. I know that keeping you're code clean by splicing it into different parts is important, but i didn't want it to be seperated because of all the cross-referencing. I will try to make as much topic-seperated Modules as possible, but as I said, it is basically one thing. But thanks anyway, if someone finds a soluton, regardless of me having avoided the problem, I would be still gratefull for it.

Dinoguy1000 (talkcontribs)

I'd welcome someone proving me wrong, but in general I don't think there's much that can be said about your situation without actually seeing your code. Without that, the most you're likely to get is vague general advice that may or may not actually apply to the specifics of your situation.

Reply to "Mediawiki Scribunto edit page timeout"