User talk:Evad37/TFDcloser.js

Found a glitch
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)
 * 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 &#91;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)
 * 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 (which may be outdated) says to "remove or collapse the discussion", but I see in your fix here did not remove them? - Evad37 &#91;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: [//en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2016_August_30&diff=prev&oldid=736876843 Step 1] and [//en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2016_August_22&diff=prev&oldid=736876778 Step 2].  And, here is an example where I left the tfd links: [//en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2016_August_27&diff=prev&oldid=736482235 Step 1] and [//en.wikipedia.org/w/index.php?title=Wikipedia:Templates_for_discussion/Log/2016_August_19&diff=prev&oldid=736482188 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)
 * ✅ (leaving tfd links behind in all cases) - Evad37 &#91;talk] 04:25, 31 August 2016 (UTC)
 * Thanks! Plastikspork ―Œ (talk) 04:35, 31 August 2016 (UTC)

A question
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)
 * 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.  ). This way, only the result will be bolded on TfD pages, and only the result will be put into the Old Tfd template. - Evad37 &#91;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)

Another thought
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 &#91;talk] 01:46, 21 August 2016 (UTC)
 * ✅ (sorry for the delay) - Evad37 &#91;talk] 05:17, 25 August 2016 (UTC)

Relisting issue
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, 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. P p p er y 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 &#91;talk] 03:28, 19 September 2016 (UTC)

Relisting gives strange error
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  it's putting. Primefac (talk) 02:13, 18 September 2016 (UTC)
 * Yep, that was the issue. Fixed now. - Evad37 &#91;talk] 03:20, 19 September 2016 (UTC)

Templates with a / in the title
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)
 * , thanks - Evad37 &#91;talk] 07:34, 20 September 2016 (UTC)

Another relisting issue
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 &#91;talk] 08:39, 28 September 2016 (UTC)

Holding Cell question
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
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 &#91;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 &#91;talk] 09:36, 28 September 2016 (UTC)

Extra nested module
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 . 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 &#91;talk] 23:51, 1 November 2016 (UTC)
 * ✅, should work properly now. Let me know if there are any further problems. - Evad37 &#91;talk] 03:12, 2 November 2016 (UTC)

Jackpot of missed signals?
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 &#91;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
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)
 * 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 Templates_for_discussion/Log/2016_December_17 ? - Evad37 &#91;talk] 00:25, 25 December 2016 (UTC)
 * User:Evad37, yes. I believe the old template generated an additional spurious  around the parenthetical links.  Thanks! Plastikspork ―Œ <sup style="margin-left:-3ex">(talk)  00:28, 25 December 2016 (UTC)
 * 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 &#91;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)

New feature: Now compatible with collapse templates
(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 ... line stays out above, and the script should detect the collapsed ones. This should solve a months-old bug, mentioned above in and. Cheers and merry xmas, - Evad37 &#91;talk] 04:15, 25 December 2016 (UTC)
 * Awesome, thanks. I'll ping 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
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 &#91;talk] 02:06, 9 January 2017 (UTC)
 * Should be fixed now. The exclamation mark in the title was mucking things up. - Evad37 &#91;talk] 08:13, 12 January 2017 (UTC)

Now I'm just getting nitpicky
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)
 * ✅ (this was an easy one) - Evad37 &#91;talk] 09:19, 17 January 2017 (UTC)

Bit glitchy today
I'm getting this error when I try to relist: 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)
 * 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 &#91;talk] 00:56, 25 January 2017 (UTC)
 * Should be fixed now - Evad37 &#91;talk] 03:41, 25 January 2017 (UTC)

Update needed
You're scripts probably need to be updated to account for Template talk:Tfd, which added an HTML comment to the end of the output produced by {{subst:tfd}}. P p p e<big style="position:relative;top:10px">r y 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)