Jump to content

Module talk:Project portal

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 2 years ago by Dcljr in topic Completely removing this module

TODO

[edit]
  • 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.

Sorting

[edit]

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)Reply

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)Reply
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)Reply

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)Reply

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

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)Reply

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

@MarcoAurelio: are you familiar with this at all? — xaosflux Talk 05:07, 14 December 2019 (UTC)Reply
@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)Reply
@Martin Urbanec: any experience on this one? — xaosflux Talk 17:50, 15 December 2019 (UTC)Reply
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)Reply
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)Reply
@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)Reply

@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 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)Reply

@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)Reply
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)Reply

Unlisted Wikivoyage causing errors

[edit]

This line is currently erroring due to this edit and the absence of voy:shn: at Wikivoyage/Table:

Lua error in Module:Project_portal at line 99: bad argument #1 to 'log10' (number expected, got nil).

 – Minh Nguyễn 💬 03:40, 25 March 2022 (UTC)Reply

Hello @Mxn: What do you suggest we do to fix this? https://shn.wikivoyage.org exists so I guess the bot should've detected it and added the same to the table, right? Shall we remove it from /wikis in the meanwhile? —MarcoAurelio (talk) 10:46, 25 March 2022 (UTC)Reply

Completely broken now?

[edit]

It seems, based on the previous thread (immediately above), that changes to pages like Wikivoyage/Table can cause problems with this module. This is Not Good, because as of 2022-10-15, that page and all similar pages (Wiktionary/Table, etc.) are now being presented in a completely different way, as explained at Talk:List of Wikipedias#Convert to template-based approach. Is this module even "in use" anymore? (I mean, "in reality", not just based on Special:WhatLinksHere/Module:Project portal.) If it still needs to work, it seems like it could be changed to use Module:NUMBEROF, as Wiktionary/Table, etc., currently do. If not, then it (and any other relevant pages) should be marked as "historical". - dcljr (talk) 04:24, 2 November 2022 (UTC)Reply

@Dcljr: I migrated Module:Project statistics to d:Data:Wikipedia statistics/data.tab, which seems to fix the errors. Minh Nguyễn 💬 08:01, 14 November 2022 (UTC)Reply

Completely removing this module

[edit]

Now this module is only used in Www.wikimedia.org template and the rest are migrated to the new portals system. wikimedia.org doesn't get updated regularly and didn't need the template in the first place. We can just blank it, delete it, whatever. What do you think @Dcljr and @MarcoAurelio, @Mxn and @Hasley Amir (talk) 19:46, 10 November 2022 (UTC)Reply

@Ladsgroup: No opinions. If the Module may still be useful to update the wikimedia.org portal I'd say to keep it around until that portal is also migrated to the new system, otherwise we can just remove the module from the pages that use it and keep it around as historical (or RFD it). I'd prefer to hear from others as well though. Thanks, —MarcoAurelio (talk) 15:58, 13 November 2022 (UTC)Reply
I have already migrated Wikimedia.org to the new portals. It's not yet merged and deployed yet buy the work is done. Amir (talk) 18:49, 13 November 2022 (UTC)Reply
I have no stong feelings about what should happen here, but I think the module should at least be marked as "historical", assuming it no longer does anything useful. Pinging User:Johnuniq because they seemed to know something about how this was supposed to work (see also my comment in the previous thread). - dcljr (talk) 02:41, 14 November 2022 (UTC)Reply
I don't have an opinion and do not remember how I got involved—someone at enwiki probably asked me to comment back in 2019. I see that the two global variables I mentioned at 28 December 2019 above (issue and metric) are still there and are probably still bugs. If there is a technical issue to be investigated I could have a look but how the module is used or what happens to it are outside my scope. Johnuniq (talk) 04:24, 14 November 2022 (UTC)Reply
In that case, it looks like User:Mxn might be the only one who could give a definitive answer (/opinion), since he created this module and did almost all of the work on it up until August 2018. He's been pinged, but has not edited here since that happened. I've left a message on his talk page at Wikidata, where he has recently edited. - dcljr (talk) 06:03, 14 November 2022 (UTC)Reply
@Ladsgroup: I think this module, Module:Project portal/wikis, and Module:Project portal/views.json can all be archived at this point. However, {{Historical}} only works on content pages, not modules, so we could add it to Module:Project portal/doc for the same effect. Module:Project statistics is still being used on a couple pages unrelated to the legacy project portal system, so it shouldn't be archived. (Pages like Wiktionary/Table could be simplified even further by adding a specialized function to Module:Project statistics to generate the wikitext. I suspect that would be more performant than the {{for nowiki}} approach.) Minh Nguyễn 💬 08:06, 14 November 2022 (UTC)Reply
By the way, @DannyS712 made some further changes in Module:Project portal/sandbox that haven't been copied over to this module yet. Minh Nguyễn 💬 08:09, 14 November 2022 (UTC)Reply
Whoa… I just noticed the translation function of this module ("p.translatePortal"), as used at List of Wikipedias/Table/vi (note the Vietnamese column headings). What voodoo is this? — It doesn't seem to be working for column headings that include style information. Can that be fixed, Mxn? If so, that seems like a much simpler solution [for normal editors to use] than what I was doing. - dcljr (talk) 08:27, 14 November 2022 (UTC)Reply
@Dcljr: Oh, I forgot about that. This pattern needs to account for the potential presence of a style attribute. This page is also supposed to localize all the language names into Vietnamese, so the page could serve as an alternative to editors updating w:vi:Wikipedia:Phiên bản ngôn ngữ by hand. However, it broke because the rows are now generated dynamically. This function is as much hack as the rest of the old auto-portal system, so I created a function in Module:Project statistics that generates the wikitext more directly and used it on that Vietnamese page. Minh Nguyễn 💬 05:52, 15 November 2022 (UTC)Reply
Wow, thanks! That gives me a lot to chew on. - dcljr (talk) 04:44, 16 November 2022 (UTC)Reply