Module talk:Project portal
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 https://www.wikiquote.org/ , 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)
- 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)
- 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)
|This edit request has been answered. Set the |
- @MarcoAurelio: are you familiar with this at all? — xaosflux Talk 05:07, 14 December 2019 (UTC)
- @Martin Urbanec: any experience on this one? — xaosflux Talk 17:50, 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
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
metricis 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 Www.wiktionary.org 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 www.wiktionary.org template/auto:
- The module should display the result of the
- At line 885 (near the beginning of that function), it calls
_generatedPortalwhich is at line 490.
- After a lot of work, it reaches line 670 which calls
- 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 Www.wiktionary.org 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)