Difference between revisions of "Template:Page category check"
Jump to navigation
Jump to search
m (updated modification date) |
|||
Line 1: | Line 1: | ||
− | <includeonly>{{#if: <!--{{#vardefineecho:categories |--> {{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{ | + | <includeonly>{{#if: <!--{{#vardefineecho:categories |--> {{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{#replace:{{{Category}}} |
| Category:Stubs}}<!--Order makes a difference for post-expand include size but exact relationship is unclear--> | | Category:Stubs}}<!--Order makes a difference for post-expand include size but exact relationship is unclear--> | ||
<!--| Category:Pages that are obsolete}}--><!--Shouldn't be categorized actually--> | <!--| Category:Pages that are obsolete}}--><!--Shouldn't be categorized actually--> | ||
Line 34: | Line 34: | ||
| Category:Articles verified for 1.4.3525}} | | Category:Articles verified for 1.4.3525}} | ||
| ,}} | | ,}} | ||
− | <!--}}--> || [[{{{page}}}]]<!-- ({{#var:categories}})-->, }}</includeonly><noinclude> | + | <!--}}--> || [[{{{page}}}]]<!-- ({{#var:categories}})-->, }}{{#vardefine:date|{{{Date}}} }}</includeonly><noinclude> |
{{Documentation|content= | {{Documentation|content= | ||
== Explanation == | == Explanation == | ||
Line 45: | Line 45: | ||
| named args = yes | | named args = yes | ||
| ? = page | | ? = page | ||
− | | ?Category = ? | + | | ?Category = Category |
+ | | ?Modification date = Date | ||
| sort = Modification date | order = ascending | | sort = Modification date | order = ascending | ||
| offset = 0 | | offset = 0 | ||
}} | }} | ||
</pre> | </pre> | ||
− | As the limit of 500 cannot be exceeded the modification date should be | + | As the limit of 500 cannot be exceeded, if the template doesn't return any pages, the modification date should be set the last checked date as returned under ''Output'' below. Since issues can only arise after new edits, pages that were last edited a long time ago don't have to be scanned again. |
== Output == | == Output == | ||
Line 59: | Line 60: | ||
| named args = yes | | named args = yes | ||
| ? = page | | ? = page | ||
− | | ?Category = ? | + | | ?Category = Category |
+ | | ?Modification date = Date | ||
| sort = Modification date | order = ascending | | sort = Modification date | order = ascending | ||
| offset = 0 | | offset = 0 | ||
}} | }} | ||
+ | |||
+ | The last checked date was: {{#var:date}} | ||
}}[[Category:Wiki maintenance]]</noinclude> | }}[[Category:Wiki maintenance]]</noinclude> |
Revision as of 13:14, 10 December 2022
Template documentation
Explanation
This template checks whether a content page is properly categorized. This is necessary since Special:UncategorizedPages doesn't work if the pages have categories like Category:Biotech, Category:Stubs or Category:Unverified articles defined.
The pages are scanned with the following code:
{{#ask: [[:+]] [[Modification date::>16 November 2021 15:29:34]] | limit = 500 | format = template | template = Page category check | link = none | searchlabel = | named args = yes | ? = page | ?Category = Category | ?Modification date = Date | sort = Modification date | order = ascending | offset = 0 }}
As the limit of 500 cannot be exceeded, if the template doesn't return any pages, the modification date should be set the last checked date as returned under Output below. Since issues can only arise after new edits, pages that were last edited a long time ago don't have to be scanned again.
Output
The following pages only have a maintenance category defined:
The last checked date was: 14 January 2024 09:53:40
Editors can experiment in this template's sandbox (create | mirror) and testcases (create) pages. Subpages of this template. |