[00:16:24] Happy new year everyone. Have some question about Mediawiki. [00:16:25] — I have a page, I use a template-1 in it. Inside that template I use template-2. This template-2 must add the page to category, so I write template-2 like that: [00:16:25] [[Category:MyCategory]]. [00:16:26] — Then I set this template-2 as value of a parameter in template-1 on some page. After that the page does not appear in category. [00:16:26] — What must I do to set the category of the page with 2-nd level template? [00:16:27] — Thank you. [00:26:30] PMZ: the category must be in the output. For example, if template2 is used only as evaluation of an {{#if: }}, but it's not rendered back on the page, the page won't be included in that category [00:28:18] The template2 shows some words, so it's rendered on the page. [00:28:24] Let me show it: [00:29:45] {{#if: {{{1|}}}|He|She}} finished The College[[Category:College]] [00:32:49] You can temporarily write the category as [[:Category:College]] (note the colon at the start), and see if the *link* to the category is printed on the page. If it isn't, then that wikitext portion is not rendered in the final output somehow [00:33:12] Will check now. [00:33:38] Using the template in [[Special:ExpandTemplates]] should also work to see what gets in the final output after all template transclusion [00:33:57] Three steps now. [00:33:57] 1) Adding : we can see a category name in place. [00:34:50] 2) Without : the category link works semi-good, so it shows the category name on the page, and it looks like the page is in the category now, but... [00:35:50] 3) Opening the category page Category:The College, we ONCE see the page in this category, and then, reloading the category page with F5, we see the page disappeared from this category. [00:36:20] Ok, the problem is the category isn't being updated on the category page. That's handled by the job queue. [00:37:12] OH MY, really sorry, now it looks like the problem disappeared. [00:37:14] if it appears once and then disappears, if that happened after you added the extra colon in the category link, that may be the job queue lagging a bit behind [00:37:34] !jobqueue [00:37:34] The Job Queue is a way for mediawiki to run large update jobs in the background. See http://www.mediawiki.org/wiki/Manual:Job_queue [00:37:55] No, not like this. The problem stays. [00:39:57] you can try to null-edit the page (edit, and save without touching anything). If it displays the category on that page, the category should be updated almost immediately [00:40:15] So it looks like this. [00:40:16] 1) changed the template, added : [00:40:16] 2) opened the page-1 with this template, updated with zero edit, [00:40:17] 3) this page-1 is in the category now (that's when I wrote about OH MY) [00:40:17] 4) opened the page-2 with this template, updated with zero edit, [00:40:18] 5) opened the category page, see this page-2 is also in the category for one time, [00:40:18] 6) F5 reloaded the category page, only page-1 stays there, and the page-2 disappeared. [00:41:22] This means, null-edit leads to the situation when the null-edited page appears in the category page just once. Will test a little more... [00:41:48] if you added the colon, that makes the category link a normal link, it doesn't add the page to the category [00:43:20] Wrong, all wrong. Because of the NY night I missed that once I added the template twice. This means, [00:44:04] when I removed the second insert of the template, the page-1 disappeared from the category. So there's no pages now. [00:45:25] So, when I add the colon, template does not add the pages to category, and they don't appear there. And without colon, the template DO ADD the pages to the category, yet they are shown on the category page only once, and with F5 reload they disappear. [00:45:59] Looks that the template used like inner sub-template, inside the outer template, cannot add the page in category. [00:48:29] Thank you for the idea about the idea with Special:ExpandTemplates. Tried this page. When I press OK, the error happenes, like this: [00:48:29] Exception encountered, of type "ConfigException" [00:49:12] that's a progress [00:49:16] !debug [00:49:16] For information on debugging (including viewing errors), see https://mediawiki.org/wiki/Manual:How_to_debug . A list of related configuration variables is at https://mediawiki.org/wiki/Manual:Configuration_settings#Debug.2Flogging Also see https://mediawiki.org/wiki/Manual:Errors_and_symptoms [00:50:11] Tried all this debugging, failed to understand the diagnosis. :-\ [00:51:32] So the correct description goes like this. [00:51:32] 1) If I add a category name to page --> the page adds to category. [00:51:33] 2) If I add a category name with a template --> the page adds to category. [00:51:33] 3) If I add a category name with a sub-template in a templage --> the page adds to category once, disappears on reload. [00:51:55] ...with a sub-template in a template... (misprint) [00:53:58] You should set $wgShowExceptionDetails = true; to hopefully get a more descriptive error than "ConfigException" [00:54:51] Wow! [00:54:52] GlobalVarConfig::get: undefined option: 'AlwaysUseTidy' [00:55:39] https://www.mediawiki.org/wiki/Manual:$wgAlwaysUseTidy [00:55:47] I use 1.26 version of MW. [00:56:11] it was removed on that version [00:56:44] I'm not sure if it complains about that config being set in LocalSettings or the opposite, though :S [00:57:56] So I see someone asks for that option. Will check about where's it asked for. [01:00:52] check if it's defined in LocalSettings.php and comment-out that line [01:02:07] Nothing about Tidy in LocalSettings.php file. [01:07:48] Wow. It's a bug in 1.26 MW :-) [01:10:07] MediaWiki 1.26 is obsoleted since several years ago [01:10:20] Many thanks! Special:ExpandTemplates was buggy in 1.26 MW, fixed at my side. [01:11:11] So I see the template-2 expands good, as I wanted. [01:11:59] And still fails to work as sub-template to add the page into category. [01:13:01] Expanded the template-1 with template-2 in it, so I see the category tag is inside a table. [01:20:10] One more step to success. I deleted the category page, and now the pages are successfully added into category. [01:20:52] Vulpix, seems the trouble disappeared this way. [01:20:52] that, uh... makes no sense [01:21:47] I do agree. [01:24:13] Will tell a little more nonsense in some time! [17:21:17] I just upgraded an older (~1.32) mediawiki and I am getting the "There is currently no text in this page" yet I can see the revsion info in the database, and user contributions are also empty. [23:59:12] Looks like the upgrade destroyed my wiki. Will have to pull from a backup and upgrade incrementally