User talk:Evad37/TFDcloser.js
This script has been superseded by XFDcloser. Please use that script instead. This talk page is retained primarily for historical interest. |
This script has a documentation page at User:Evad37/TFDcloser |
Found a glitch
[edit]So I just used the script to relist a page, but for some reason half the conversation shows up outside the {{collapse top}}. It has something to do with the {{flatlist}}, though I can't figure out what's throwing the error. Primefac (talk) 01:57, 14 August 2016 (UTC)
- @Primefac: That's odd, but I think its a problem with the way the templates interact – the wikitext the script added was okay (i.e. it put {{collapse top}} in the right spot). I can't see any obvious reason it displayed like that – maybe ask at WP:VPT? - Evad37 [talk] 02:55, 14 August 2016 (UTC)
- I believe the issue is when the collapse bottom is not on a newline. I just fixed another one. In my opinion, we should really avoid collapsing relisted discussions since it (1) isn't necessary, (2) causes problems like this, (3) is bad for WP:ACCESSIBILITY due to the extra clicks, (4) increases the post-expand include size, contributing to the fact that the last day doesn't appear on the main TFD page (search source for "WARNING: template omitted, post-expand include size too large"). Thanks! Plastikspork ―Œ(talk) 12:52, 30 August 2016 (UTC)
- @Plastikspork: Thanks for the feedback, sounds like good reasons not to collapse the discussion. Can you clarify on what the desired behaviour would be? WP:TFDAI#Relisting (which may be outdated) says to "remove or collapse the discussion", but I see in your fix here did not remove them? - Evad37 [talk] 13:25, 30 August 2016 (UTC)
- My preferred method (as is Plastikspork's if I remember correctly) is to remove the discussion. It saves on duplication and shortens the overall TFD list (if there are still open discussions on that particular day). Primefac (talk) 21:49, 30 August 2016 (UTC)
- I relist by (1) copy the entire thread and section heading to the new day, (2) remove everything but the section heading on the old day (or everything but the {{tfd links}} since they leave anchors in the case that there are multiple templates), and close the now empty section on the old day page with a pointer to the new day. Here is an example of the two steps: Step 1 and Step 2. And, here is an example where I left the {{tfd links}}: Step 1 and Step 2. To make things less complicated, I would say leaving the {{tfd links}} in the closed thread is probably fine. Or, removing the old {{tfd links}} isn't a disaster either since it's just a matter of possibly broken incoming anchor links. Thanks! Plastikspork ―Œ(talk) 00:07, 31 August 2016 (UTC)
- @Plastikspork and Primefac: Done (leaving {{tfd links}} behind in all cases) - Evad37 [talk] 04:25, 31 August 2016 (UTC)
- I relist by (1) copy the entire thread and section heading to the new day, (2) remove everything but the section heading on the old day (or everything but the {{tfd links}} since they leave anchors in the case that there are multiple templates), and close the now empty section on the old day page with a pointer to the new day. Here is an example of the two steps: Step 1 and Step 2. And, here is an example where I left the {{tfd links}}: Step 1 and Step 2. To make things less complicated, I would say leaving the {{tfd links}} in the closed thread is probably fine. Or, removing the old {{tfd links}} isn't a disaster either since it's just a matter of possibly broken incoming anchor links. Thanks! Plastikspork ―Œ(talk) 00:07, 31 August 2016 (UTC)
- My preferred method (as is Plastikspork's if I remember correctly) is to remove the discussion. It saves on duplication and shortens the overall TFD list (if there are still open discussions on that particular day). Primefac (talk) 21:49, 30 August 2016 (UTC)
- @Plastikspork: Thanks for the feedback, sounds like good reasons not to collapse the discussion. Can you clarify on what the desired behaviour would be? WP:TFDAI#Relisting (which may be outdated) says to "remove or collapse the discussion", but I see in your fix here did not remove them? - Evad37 [talk] 13:25, 30 August 2016 (UTC)
- I believe the issue is when the collapse bottom is not on a newline. I just fixed another one. In my opinion, we should really avoid collapsing relisted discussions since it (1) isn't necessary, (2) causes problems like this, (3) is bad for WP:ACCESSIBILITY due to the extra clicks, (4) increases the post-expand include size, contributing to the fact that the last day doesn't appear on the main TFD page (search source for "WARNING: template omitted, post-expand include size too large"). Thanks! Plastikspork ―Œ(talk) 12:52, 30 August 2016 (UTC)
A question
[edit]Is there a way to make the rationale not appear bold and included with the delete result? I just had to remove a bunch of silliness because the {{Old TfD}} notice had "the result was..." and then gave the entire rationale (see here and the edit summary there for what I'm talking about). Primefac (talk) 19:27, 20 August 2016 (UTC)
- Or, as another option, have a set of checkboxes like User:Mr.Z-man/closeAFD.js does? That way you avoid all of the links but you still get all the relevant information out of the closer. Primefac (talk) 19:43, 20 August 2016 (UTC)
- @Primefac: The second way is probably better, but requires a more substantial rewrite. For now, you can type
'''
in the prompt box, between the result and any rationale or further comments (e.g.Keep.''' While the result appears the same, these two templates are used for very different purposes
). This way, only the result will be bolded on TfD pages, and only the result will be put into the Old Tfd template. - Evad37 [talk] 01:46, 21 August 2016 (UTC)- Or put the non-bold in {{nobold}} to avoid the mismatched bold tag hack. Plastikspork ―Œ(talk) 12:53, 30 August 2016 (UTC)
- @Primefac: The second way is probably better, but requires a more substantial rewrite. For now, you can type
Another thought
[edit]If a template is ready for deletion (i.e. added to that section at the Holding Cell, shouldn't {{db-xfd}} be added to the page instead of {{being deleted}}? Bit of a hassle to say it's ready to be deleted, and then go in and edit the page to add the CSD tags. Primefac (talk) 20:17, 20 August 2016 (UTC)
- That seems sensible, I'll look into coding it - Evad37 [talk] 01:46, 21 August 2016 (UTC)
- @Primefac: Done (sorry for the delay) - Evad37 [talk] 05:17, 25 August 2016 (UTC)
Relisting issue
[edit]A while ago, I nominated of very large number of templates for merging. Since there were a large number of templates, I put most of them in a collapse box. Today, Omni Flames relisted the debate using this script, and it only updated the links on the templates outside of the collapse box, leaving the links on the rest of the templates still pointing to the original day. This is a bug that should be fixed. Pppery 13:03, 5 September 2016 (UTC)
- Noted. Similar issues occur when other markup that disrupts the standard list format is used, such as linebreaks between list items. The challenge is to detect links to templates which are part of the nomination, but exclude other links that may just be part of the discussion. I haven't yet come up with a solution. - Evad37 [talk] 03:28, 19 September 2016 (UTC)
Relisting gives strange error
[edit]Methinks that some spaces should be turned into underscores on the Relist script. When I relist a discussion it gives the message "Closed as Relisted on 2016 September 18 (reload page to see the actual close)." I'm guessing that instead of Wikipedia:Templates_for_d...
it's putting Wikipedia:Templates for d...
. Primefac (talk) 02:13, 18 September 2016 (UTC)
- Yep, that was the issue. Fixed now. - Evad37 [talk] 03:20, 19 September 2016 (UTC)
Templates with a / in the title
[edit]It wouldn't close discussions like this one. Seems to be a problem if the name has a slash in the title. You probably just need to escape some characters in the regexp or something. Thanks! Plastikspork ―Œ(talk) 00:05, 20 September 2016 (UTC)
- Fixed [1], thanks - Evad37 [talk] 07:34, 20 September 2016 (UTC)
Another relisting issue
[edit]When relisting the {{subst:relist}} appears to be on the same line as the last comment, resulting in some div errors (Special:Diff/741506781) which need to be fixed manually (Special:Diff/741507024). Primefac (talk) 23:05, 27 September 2016 (UTC)
- Should be fixed now - Evad37 [talk] 08:39, 28 September 2016 (UTC)
Holding Cell question
[edit]Is there a way to skip the Holding Cell stage? I closed a discussion as "redirect", which took one edit to implement, and then I had to go over to the Holding Cell to remove the entry, which took a lot more clicks. If not, that's fine, but I thought I'd ask. Primefac (talk) 23:30, 27 September 2016 (UTC)
- Never mind. Something like "redirect" should be a "keep/other" not a "delete/other". Now that I've realized this, I'm not sure there's a need to skip the Holding Cell for (proper) delete/others. Primefac (talk) 02:19, 28 September 2016 (UTC)
A rather large glitch
[edit]I closed this discussion as "delete/other", but for some reason it tagged the wrong page (and with a non-standard delete message). My guess is that the multiple "Template:" in the link name threw it off. Fortunately the issue was caught before the wrong page was deleted. Primefac (talk) 02:28, 28 September 2016 (UTC)
- Yeah, the extra "Template:" was the problem. I'm not immediately sure how this can be solved, but I'll start thinking about it. - Evad37 [talk] 08:47, 28 September 2016 (UTC)
- Actually, I managed to come up with a fix fairly quickly; similar cases shouldn't have a problem. - Evad37 [talk] 09:36, 28 September 2016 (UTC)
Extra nested module
[edit]I had to clean up after closing Template:Ordovician nav. Basically, you can see that there is now another module stuck inside, so the pattern match needs to be updated to get the whole thing. Thanks! Plastikspork ―Œ(talk) 02:12, 1 November 2016 (UTC)
- Oh... yeah... That was done by pppery. The discussion is here if you're interested. Primefac (talk) 03:39, 1 November 2016 (UTC)
- Yeah, I'll need to look into updating the regex - Evad37 [talk] 23:51, 1 November 2016 (UTC)
- @Plastikspork and Primefac: Done, should work properly now. Let me know if there are any further problems. - Evad37 [talk] 03:12, 2 November 2016 (UTC)
Jackpot of missed signals?
[edit]I listed some templates on 4 Nov. It doesn't have "Template" in the section header, the first template uses {{tfd links}}, and I've put the other 86 inside {{cot}}/{{cob}} (for obvious reason). Is there some combination of the above that makes it so the script doesn't recognize there are template there? I completely understand not reading the ones in cot/cob (especially since they're just template links and not tfd links), but I put the one up top in an attempt to make it closable. Primefac (talk) 04:11, 4 November 2016 (UTC)
- The script expects that, when it detects only one link, it is a single template nomination – as such, it expects the heading to be page title, including "Template:". The script then does a "sanity check" to make sure it's in Template: namespace, and that fails because "Latest preview release templates" is not. The TFD section should still be close-able using the script, but the templates / template_talk pages will need to be edited or deleted manually. - Evad37 [talk] 05:18, 4 November 2016 (UTC)
- That makes sense, and with only the top template using tfd links I would need to be closing everything manually anyway. But things like this are reasons I keep doug's script around ;) Primefac (talk) 13:55, 4 November 2016 (UTC)
Deleting every other template
[edit]Hi, this may be due to changes at {{Tfd links}}, but when I closed a discussion with more than one {{Tfd links}}, the delete button only deleted every other template in the list. Thanks! Plastikspork ―Œ(talk) 16:53, 24 December 2016 (UTC)
- @Plastikspork: Its quite possible, given that the script works with the HTML output of the template... I'll have to investigate. Did the same thing happen with Wikipedia:Templates_for_discussion/Log/2016_December_17#Get_regnum.28.29_templates ? - Evad37 [talk] 00:25, 25 December 2016 (UTC)
- User:Evad37, yes. I believe the old template generated an additional spurious
<span>...</span>
around the parenthetical links. Thanks! Plastikspork ―Œ(talk) 00:28, 25 December 2016 (UTC)- @Plastikspork: Should be fixed now. I was filtering out every second span before, because of those spurious ones. When they disappeared, that filter translated into filtering out every second template, hence why only every other one was deleted. - Evad37 [talk] 01:43, 25 December 2016 (UTC)
- great. I should have known to post a notice here when I made the change to the template. Frietjes (talk) 15:45, 25 December 2016 (UTC)
- on a related note, does this script delete the talk page as well? seems like that would be a useful button to have if it's not there already. thank you again. Frietjes (talk) 15:46, 25 December 2016 (UTC)
- @Plastikspork: Should be fixed now. I was filtering out every second span before, because of those spurious ones. When they disappeared, that filter translated into filtering out every second template, hence why only every other one was deleted. - Evad37 [talk] 01:43, 25 December 2016 (UTC)
- User:Evad37, yes. I believe the old template generated an additional spurious
New feature: Now compatible with collapse templates
[edit]@Pppery, Primefac, Plastikspork, and Omni Flames: (and any others who are interested)
After I moment of inspiration/enlightenment this morning, I finally figured out how to get the script to function properly when some of the nominated templates have been collapsed with {{cob}}&{{cot}}, or similar templates. Just make sure that at least one * {{Tfd links
... line stays out above, and the script should detect the collapsed ones. This should solve a months-old bug, mentioned above in § Relisting issue and § Jackpot of missed signals?. Cheers and merry xmas, - Evad37 [talk] 04:15, 25 December 2016 (UTC)
- Awesome, thanks. I'll ping Frietjes as well, since she's been doing a few mass noms recently. Primefac (talk) 15:02, 25 December 2016 (UTC)
- great. Frietjes (talk) 15:44, 25 December 2016 (UTC)
Another relisting glitch
[edit]As of this particular moment I am unable to relist this TFD. Not sure if it's because it's the top template or something else, but it doesn't look like there's anything different about it (compared to other noms). Primefac (talk) 00:26, 6 January 2017 (UTC)
- It's gotten some more comments, and I was going to close, but apparently none of the links work. Primefac (talk) 00:18, 9 January 2017 (UTC)
- Thanks for letting me know Primefac. I've been away for a few days, but I will be looking into this when I get a chance. - Evad37 [talk] 02:06, 9 January 2017 (UTC)
- @Primefac: Should be fixed now. The exclamation mark in the title was mucking things up. - Evad37 [talk] 08:13, 12 January 2017 (UTC)
Now I'm just getting nitpicky
[edit]The quick delete/keep options don't add a full stop after the delete rationale (so it shows up as Delete Name). It's a minor thing, but it bothers me :p Primefac (talk) 01:33, 17 January 2017 (UTC)
- See Jan 9 for examples of both. Primefac (talk) 01:33, 17 January 2017 (UTC)
- @Primefac: Done (this was an easy one) - Evad37 [talk] 09:19, 17 January 2017 (UTC)
Bit glitchy today
[edit]I'm getting this error when I try to relist:
Error: "·" is not in Template: namespace, TFDcloser will not edit this page
It also wouldn't let me delete a page (bad header or something, refreshed before I could see it). Had to delete manually. Primefac (talk) 00:11, 25 January 2017 (UTC)
- @Primefac: I see that there's been some recent edits to Module:TfdLinks. I havcen't got time to investigate now, but that's likley the caused the script to grab a mid-dot character instead of the template name. (Perhaps I should add twinkle-style "if you change anything, please let me know" notices to template/module docs) - Evad37 [talk] 00:56, 25 January 2017 (UTC)
- @Primefac: Should be fixed now - Evad37 [talk] 03:41, 25 January 2017 (UTC)
Update needed
[edit]You're scripts probably need to be updated to account for Template talk:Tfd#New Request 2017-03-04, which added an HTML comment to the end of the output produced by {{subst:tfd}}. Pppery 14:36, 5 March 2017 (UTC)
- I've undone the change. That's a huge change that needs discussion first. Primefac (talk) 14:42, 5 March 2017 (UTC)