Module talk:Project portal

From Meta, a Wikimedia project coordination wiki
Jump to navigation Jump to search


  • Verify that the search box's language menu is up-to-date.
  • Verify that the top 10 links' lang* classes are in ascending numeric order.
  • Generate minified output for easy copy-pasting onto the live portal.


At least for , the sorting is incorrect. Per Top Ten Wikipedias and Project portals, top 10 wikis must be sorted by usage and not by article count. --Nemo 14:05, 1 November 2015 (UTC)

Alright, that's a pretty easy change, though it's going to look a bit lopsided when Vietnamese appears up top for whatever reason. – Minh Nguyễn 💬 15:15, 1 November 2015 (UTC)
Yes check.svg Done Nemo bis. You may need to clear your cache or append a query to the URL to see the changes. – Minh Nguyễn 💬 15:21, 1 November 2015 (UTC)

wikt broken[edit]

Error being thrown: Lua error: attempt to index field '?' (a nil value). See error at this link. — xaosflux Talk 17:00, 28 December 2019 (UTC)

@Mxn: would you take a look at this, it is throwing errors on template. Thank you, — xaosflux Talk 19:55, 10 December 2018 (UTC)

Yes check.svg Done Fixed by adding yue: to the table of wikis for Wiktionary (not to be confused with zh-yue:, used by Wikipedia.) – Minh Nguyễn 💬 06:03, 15 December 2018 (UTC)

@Mxn: don't suppose you could have a look at this again template is mad again. — xaosflux Talk 21:21, 3 December 2019 (UTC)

@MarcoAurelio: are you familiar with this at all? — xaosflux Talk 05:07, 14 December 2019 (UTC)
@Xaosflux: Thanks for the ping. I'm sorry but I'm not familiar with this Module. Sorry for the late reply but I'm on wikibreak (logging-in sporadically to check for messages, etc.). Best, —MarcoAurelio (talk) 19:24, 15 December 2019 (UTC)
@Martin Urbanec: any experience on this one? — xaosflux Talk 17:50, 15 December 2019 (UTC)
I feel this is related to the fact we now have shywiktionary, but we do not have shywiki. --Martin Urbanec (talk) 18:25, 15 December 2019 (UTC)
I'll look later, although I don't have permission to edit the module. Meanwhile, there are two global variables, at least one of which is unintended and will give a bug. They are issue and metric. The first of those would give the error at line 380 and has a simple fix. My one-minute look fails to see what metric is or where it might be defined. Any clues about how this module is called and what might define metric? Johnuniq (talk) 22:32, 28 December 2019 (UTC)
@Johnuniq: For example, the page template/auto invokes Module:Project portal this uses: Module:Project statistics, Module:Project portal/wikis, and Module:Project portal/views.json. The last time we had a similar problem it was missing data in Module:Project portal/wikis. — xaosflux Talk 00:25, 29 December 2019 (UTC)

@Xaosflux: I have changed my mind about line 380. It is an unintended global that should be fixed, but it would not cause the current problem. Similarly line 128 needs to be fixed: metric should be replaced with something, probably top10Metric although that's a guess. Debugging a module like this would be straightforward using the "Preview page with this module" feature that is available when editing. However, I can't do that without privileges and I can't see any test system that would allow simulation in a sandbox module. If you know enough about what is needed, you might be able to set up a test I can edit somewhere. Waiting for mxn would work.

In case it helps, here is what is happening at template/auto:

  • The module should display the result of the instructions function.
  • At line 885 (near the beginning of that function), it calls _generatedPortal which is at line 490.
  • After a lot of work, it reaches line 670 which calls mw.ustring.gsub.
  • The gsub gives the error which is displayed.

The problem is probably in the unnamed function spanning lines 680–848. A complete guess would be that line 778 generates the error because subWikis is nil, and that would occur because the macroLangs table at line 652 is missing a required setting—possibly connected with shywiki mentioned above. This would be quickly sorted out by debugging while editing the code. If you want to try it, I could give you a hint but it would quickly get too tedious if my first guess didn't work. Johnuniq (talk) 01:56, 29 December 2019 (UTC)

@Johnuniq: more improvement could be needed, but it does appear that adding Tachawit language to Module:Project portal/wikis has resolved the immediate problem. Would be good to see any of mxn's input on this when they return. Thank you, — xaosflux Talk 02:11, 29 December 2019 (UTC)
Good. Now that it is working, the output at template/auto includes the following which might be worth recording for the future: The generated code draws from the following unprotected pages:
Johnuniq (talk) 02:29, 29 December 2019 (UTC)