Template talk:Stub

From MEpedia, a crowd-sourced encyclopedia of ME and CFS science and history

Alternative code to Module:Asbox use[edit source | reply | new]

<table class="metadata plainlinks stub" role="presentation" style="background:transparent!important"><tr><td>[[File:Puzzle_piece_gray.svg|40x30px|alt=Stub icon]]</td><td>''<div style="display:inline!important ;padding:0 !important">{{stub text}}</div >''</td><tr><td></td><td><span class="mbox-text-span" style="padding:0; display:inline!important">{{Help improve text}}</span></td></tr></table>

This add categorization code:

[[Category:All stub articles]][[Category:stubs]][[Category:Stub pages last edited in 2019]]


Bug in template[edit source | reply | new]

This template attempts to categorize stub pages by the date the stub template was added to the page. Instead, it categorizes it by the date of the most recent revision, not the date the stub template was added. Therefore, the categories can change every single time the page is updated! I just made a minor change to the page 25pillsaday and it suddenly jumped from Category:2017 stubs to Category:2019 stubs. User:Notjusttired Are you aware of this?
Pyrrhus (talk) 22:22, September 9, 2019 (EDT)

By categorizing by revision date it shows which stubs have not been updated for longest, so it's helpful that way. Although it can be changed generally stubs aren't added with a date and I seem to remember that you can't find the date added to a category or the date a template is added later on. Previously we have no stub subcategories. If you know a way to change the date to pick up the date first added to a category / the date a template was added then feel free to change. notjusttired (talk) 17:00, September 10, 2019 (EDT)
I see, thanks for clarifying User:Notjusttired! Perhaps we should change the category names to "Stub pages last edited in 2019", just to make it clear? Yeah, since the template is dynamically transcluded instead of statically substituted, the only way to specify the date the stub tag was added is to enter the date as a parameter to the template. Hmm. Maybe I'll add a collapsible list by stub date to Category:Stubs in case anyone wants to search by the date the stub tag was added...
Pyrrhus (talk) 17:49, September 11, 2019 (EDT)
Sounds like a good suggestion. The categories would need renaming of course. The main point here is have a way of subcategorizing stubs rather than a list of hundreds that all seem the same priority. Some of the oldest stubs are very unimportant and might be better just in a glossary so there did not seem much point categorizing by date the page was created. notjusttired (talk) 07:37, September 12, 2019 (EDT)
✓ Done as discussed! We should probably do something similar for Template:Cleanup. How about renaming those categories "All articles needing cleanup marked for cleanup in or last edited in YEAR"?
Pyrrhus (talk) 23:25, September 25, 2019 (EDT)

Recent changes[edit source | reply | new]

  • puzzle piece image can be removed - just delete the value set for image =
  • if the "check the talk page for ideas" line isn't helpful then delete the value in the note = part to get rid of it - a talk page message isn't displayed unless there is a talk page
  • translations to different languages are done using Template:Stub text - if your language is missing or the message is wrong feel free to edit it

notjusttired (talk) 15:26, August 22, 2019 (EDT)

Just creating this page[edit source | reply | new]

This talk page is apparently somehow linked to from every stub article. So I'm creating this page to keep it from popping up in the list of "wanted" pages. Pyrrhus (talk) 19:20, 1 May 2019 (EDT)

Module Protection banner error[edit source | reply | new]

Now displays an error when choosing template, but not when viewing pages calling the template I don't know why it would be calling the Module:Protection banner sons that has never worked and we add a protection templates instead. User:Pyrrhus ~Njt (talk) 16:11, October 6, 2019 (EDT)

Njt This appears to have occurred as a result of protecting the template page. When a template page is protected, there is supposed to be a banner automatically added to the top of the protected template page. I noticed it when I fully-protected Template:Protected and the banner suddenly, automatically appeared at the top of the template page, and the page was automatically added to Category:MEpedia fully-protected templates. This process obviously has some bugs in it, and I am trying to understand it better. If you learn anything about these bugs, please enlighten me!
Pyrrhus (talk) 19:42, October 6, 2019 (EDT)
I thought you might have tried to add it. I have looked again and the odd ah seems to be: Template:Done to Module:Documentation to Module:Protection banner? to Module:Effective protection level - which needs MediaWiki:Titleblacklist - the error is telling us that it doesn't exist I think. It could be copied from mw:MediaWiki:Titleblacklist - although it might work simply to create a blank page. The code in the page like ⁠ etc are codes representing particular characters in unicode, adding those might restrict what titles we can create on MEpedia. Changing the code to ignore the title blacklist that doesn't exist is an option. ~Njt (talk) 20:18, October 6, 2019 (EDT)
Njt You're right, it all comes from Template:Documentation. I added {{documentation}} to Template:Welcome and now Template:Welcome shows up in the correct protection category with the correct protection banner. I thought perhaps the version of Template:Documentation that we imported from Wikipedia might only work on Wikipedia, so I tried importing a clean copy of Template:Documentation from MediaWiki instead. It came with a number of dependencies, though, so I have to review the imported pages tomorrow to make sure nothing was broken as a result of the import. It doesn't seem to have fixed anything, though.
Pyrrhus (talk) 23:41, October 6, 2019 (EDT)
It is like spaghetti to be honest. Looks like the Stub page is still showing the error too. The simplest thing to do, having looked at the code, is to use this virtually empty blacklist which just prevents .php. file uploads (the first version from Commons) - MediaWiki:Titleblacklist set to this, without the "pre"

# That's a title blacklist
# Every title that matches regex here are forbidden to create and edit
# Use "#" for comments
.*index\.php.*

Importing extra pages shouldn't cause issues, it's updating existing pages that might. ~Njt (talk) 23:55, October 6, 2019 (EDT)
Njt FYI, the other related bug I noticed is that clicking on the full protection banner takes you to Special:Upload!
Pyrrhus (talk) 00:25, October 7, 2019 (EDT)
I figured out how to disable the blacklist, although I would have preferred to have an empty MediaWiki:Titleblacklist to be created instead. The error is gone at last! I can't find any link to the upload page so I suspect that it is happening because the page is trying to display an image that doesn't exist. I've updated those filenames now, plus checked no other modules or templates are using old protection templates. If it's still happening then let me know the name of any particular image it is trying to upload or exactly where to click on each page, then I can view the code to look for it. I also found that the documentation template had some subpages that needed minor edits. ~Njt (talk) 08:04, October 7, 2019 (EDT)
Just finished going through the new imports - normally it's chaos sorting out the edits that need redoing but surprisingly almost all were identical and didn't refer to filenames, pages or categories. ~Njt (talk) 15:29, October 7, 2019 (EDT)
Njt Thanks for sorting out the protection banners!!! They look great now, I can't see any bugs. I did, however, notice a problem with the Template:Documentation import I did last night- some pages appeared to have been imported, but actually weren't. And there was no error/warning message. I noticed it when I looked at the page history for Module:Protection banner/config. Normally, when you import a page, it creates two entries in the page history, but in this case there was only one entry. When I looked at the page content, it hadn't changed as a result of the import, although it should have. I'll let you know what I find out. It seems like every time we fix one bug, we discover another! D'oh!
Pyrrhus (talk) 20:12, October 7, 2019 (EDT)
Never mind, Njt. I figured it out and there is no import bug. The import did, in fact, create two entries in the page history for Module:Protection banner/config. But one of the entries was dated June 22, 2019, so it didn't affect the current page content at all. The lesson here is to be aware that page imports only change the page content when the revision date in the XML file is after the latest MEpedia revision date.
Pyrrhus (talk) 20:41, October 7, 2019 (EDT)
That might be why most were not changed, but weird to see previous edit dates in the history for edits that were never made. It would be a bad idea to re-import that particular module since it's there for customisation, better to copy and paste the new code and use show changes to work out what sections have changes that must be kept. Re-importing modules is usually a very bad idea unless there is a particular bug, nearly all have altered links, filenames etc - and as modules those don't show in What Links Here. ~Njt (talk) 21:14, October 7, 2019 (EDT)