Jump to content

User talk:Evad37/MoveToDraft.js

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia


Title of subpage

[edit]

How can I change the title of the "Draftify log" subpage which logs the actions performed by this script? Would it be okay if I copy the entire source to my subpage then customize the subpage location? KingAndGod 13:46, 22 April 2018 (UTC)[reply]

@KingAndGod: At the moment the subpage name is hard-coded in the source. Is there actually a need to have it at a different page title? You could always transclude it to another page using {{User:KingAndGod/Draftify log}} if you want it to show up somewhere else. As for copying the entire source – you can do so if you want, just provide attribution as per the CC-BY-SA-3.0 licence (just like any other Wikipedia page, see WP:Copying within Wikipedia) and make sure edit summary links go to your version of the script. The downside of doing so is that you then don't get any updates if I fix bugs, or add/improve features. - Evad37 [talk] 00:24, 23 April 2018 (UTC)[reply]
Also note that the logs aren't just for you; they also make it easier for others to review your draftications. Allowing non-standard titles could potentially somewhat obscure the logs. - Evad37 [talk] 00:38, 23 April 2018 (UTC)[reply]
Okay thanks! I was looking to make the maintenance logs more consistently titled with the prefix "log-" for proper sorting (e.g. log-draftify, log-prod, log-speedy, etc). KingAndGod 11:05, 23 April 2018 (UTC)[reply]
I'd like the option to alter the filename too. Twinkle allows me to keep CSD & PROD logs in the same file. I'd like the Draftifying to be logged in the same log, User:Cabayi/CSD log. Cabayi (talk) 23:21, 21 November 2018 (UTC)[reply]

Show only on mainspace articles

[edit]

Currently, the "Move to draft" link is shown on all pages, even talk pages and special pages such as logs and user contributions pages. It would also be confusing for pages that are already in the draft namespace. The script should therefore be fixed to only show the link in the "More" menu in the Vector skin or between the "history" and "move"/"delete" (for admins) tabs in the Monobook skin on non-redirect articles in the main namespace excluding disambiguation pages. GeoffreyT2000 (talk) 21:23, 23 April 2018 (UTC)[reply]

 Partly done. Fixed the namespace detection - that was there previously but I broke it in a recent update. Detecting mainspace pages on which the script shouldn't activate is a bit more tricky. - Evad37 [talk] 00:13, 24 April 2018 (UTC)[reply]

AfC Template Optional?

[edit]

Would it be possible to add a checkbox (which would be checked by default) to decide if we want to leave the AfC template or not? Given ACPERM I feel that the template is unnecessary on a good number of articles I move to draft and it would be nice to not have that template on there for editors that don't need to go through AfC but who are still creating articles which might be best put in draft space temporarily. Best, Barkeep49 (talk) 15:30, 18 September 2018 (UTC)[reply]

Draftspace move notice

[edit]

Hi Evad37,

Please fix: "I've moved your draft to draftspace" to I've moved your article to draftspace"

I created a manual Draftspace move notice User:Siddiqsazzad001/Draft. Siddiqsazzad001 <Talk/> 18:20, 26 January 2019 (UTC)[reply]

I think it's best to treat the contribution as the editor's "draft" than the editor's "article", which assumes some sort of affiliation/ownership with the topic. After all, the tool is moving a draft, not an article. czar 18:41, 26 January 2019 (UTC)[reply]
@Czar: Siddiqsazzad001 does have a point that the current phrasing is a bit inconsistent: An article you recently created ... I've moved your draft to [[Wikipedia:Draftspace|draftspace]] ... where you can incubate the article with minimal disruption ... When you feel the article meets Wikipedia's [[WP:GNG ... click on the "Submit your draft for review!" button. - Evad37 [talk] 23:30, 26 January 2019 (UTC)[reply]
It's your script so fine with whatever you choose but I don't think it's necessary to call it a "draft" each time. As is, it's "your draft" and "the article" (or "article you created") but not "your article". czar 00:11, 27 January 2019 (UTC)[reply]
@Czar: and @Evad37: I fixed my Draftspace move notice [1]. Siddiqsazzad001 <Talk/> 01:12, 27 January 2019 (UTC)[reply]

Option for mulitiple Authors?

[edit]

Greetings, Where it asks Initial author can a pipe ( | ) be used to add more than one authors? Today for an article written in 2009 I did override Author to a more current editor. Wondering if script allows several editors? Also, if left blank will it skip the Author notification? Can I fill in my own Username to "send-to-self"? Regards, JoeHebda (talk) 18:27, 10 April 2019 (UTC)[reply]

This morning I tested by using myself as "Notify author" and yes that does work. BTW, thanks for the Checkbox for Notify--very handy, especially for dormant & blocked authors. Also testing, I did change wording on the actual notification here. Added timestamp & attempt to clarify wording. Cheers! JoeHebda (talk) 14:13, 13 April 2019 (UTC)[reply]

Userfy?

[edit]

I've been using MoveToDraft for a while, and it's wonderful. Thanks for writing it. Would it be possible to produce a "MoveToUserspace version? -- RoySmith (talk) 15:28, 30 January 2020 (UTC)[reply]

@RoySmith: Is this for REFUND and DRV cases like Wikipedia:Deletion_review/Log/2020_January_30#Martin_Rundkvist ? - Evad37 [talk] 17:05, 30 January 2020 (UTC)[reply]
Yup, exactly. -- RoySmith (talk) 17:11, 30 January 2020 (UTC)[reply]

Script should not violate global rights policy

[edit]

Per Wikipedia:Global rights policy, Global rollbackers may use the ... suppressredirect function[] on the English Wikipedia only in the context of counter-vandalism efforts. Moving pages to the draft namespace is not in the context of counter-vandalism efforts, so the script should leave a redirect behind when a global rollbacker (who isn't also a page mover or sysop) draftifies an article. * Pppery * it has begun... 02:19, 27 May 2020 (UTC)[reply]

Any such cross-namespace redirect left behind would then be tagged as WP:R2 and deleted. Surely there is a more elegant solution? czar 02:24, 27 May 2020 (UTC)[reply]
The problem appears to be confined to 4 users...
... who should consider requesting the local extendedmover permission. Cabayi (talk) 10:06, 27 May 2020 (UTC)[reply]
Streetdeck, there's a concern that if you use the MoveToDraft function (which you have got installed in your common.js), it may use your global rollbacker priv to suppress the redirect which would otherwise be created. The script doesn't ask, it suppresses automatically. As that move is not strictly counter vandalism the suppression of a redirect could technically be in breach of the Wikipedia:Global rights policy#Global rollbackers. Cabayi (talk) 11:22, 27 May 2020 (UTC)[reply]
Okay... I'm local rollbacker here. ----Wright Streetdeck 11:46, 27 May 2020 (UTC)[reply]
Streetdeck, suppressredirect is included in global rollbacker, but locally it's included in the local extendedmover permission, and not included in the local rollbacker permission. Cabayi (talk) 11:57, 27 May 2020 (UTC)[reply]

minor bug

[edit]

Hello User:Evad37. Could you please change line 350:

prependtext: '{{Db-r2}}\n'

,

to:

prependtext: '{{db-r2}}\n'

,

...with a lowercase "d"? The uppercase D is correct, but for some reason articles tagged with the uppercase D don't appear in Category:Candidates for speedy deletion as inappropriate cross-namespace redirects. Thanks, Captain Calm (talk) 08:57, 27 August 2020 (UTC)[reply]

@Captain Calm: That wouldn't actually make a difference, see previous discussion User talk:Evad37/MoveToDraft.js/Archive 1#Db_vs._db - Evad37 [talk] 11:22, 28 August 2020 (UTC)[reply]

Is there an error?

[edit]

I edit (mostly) from mobile and whenever I load any wikipedia page, I get a notification that states: "An attempt to load a user script has failed. Please see JavaScript console for more information." – the bold "user script" is a link that lands on user:Evad37/MoveToDraft.js. Is there a bug with the Draftify tool? – DarkGlow (contribstalk) 21:22, 25 January 2021 (UTC)[reply]

@DarkGlow: No, this is a general issue: Wikipedia:Village pump (technical)#"An attempt to load a user script has failed". - Evad37 [talk] 00:43, 26 January 2021 (UTC)[reply]

I also saw this issue, when I'm navigating from a mobile device. Rodney Araujo Tell me - My contributions 14:12, 26 January 2021 (UTC)[reply]

Add to watchlist option

[edit]

Hey Evad. Thanks for making this script. Quick feature request. Perhaps create a setting we can add to common.js that will have the draftify script automatically watchlist the old page and the new page upon draftifynig. Hope that helps. Thank you. –Novem Linguae (talk) 14:54, 11 March 2021 (UTC)[reply]

Help

[edit]

Hello Evad37, and thanks for developing this script with amazing features. However, it appears there is a possible bug in this script. I have draftified many non-notable or/poorly sourced articles using this script. However, I am not sure why some deleted or active articles appear in my article creation list at xtools when i have never created them? The issue is only with a few articles such as Seyed Ebrahim Amerian, Dominica at the 2019 World Athletics Championships and Arya Linux (OS). Is there any option to remove them from my article creation list, please? TheBirdsShedTears (talk) 16:56, 2 August 2021 (UTC)[reply]

@TheBirdsShedTears: The basic process the script follows is pretty much the same as manually moving an article into draftspace and then doing some cleanup edits. The automatic creation of a redirect as a result of the move can't be suppressed unless you have admin or page mover rights. If another tool is showing these pages as article creations instead of redirect creations, then you need to file a bug report or feature request with that tool's maintainers. - Evad37 [talk] 06:32, 3 August 2021 (UTC)[reply]

Double Draft

[edit]

See this and that, in that the script prepends an extra "Draft:" to a name if the draft already exists. Primefac (talk) 20:01, 23 August 2021 (UTC)[reply]

I don't know if this is related. When a draft already exists the script generates an error message with 'Try again' and 'Cancel' buttons. Going back to March 2020 when I first started using the script, pressing the 'Try again' always brought up the error message again so I started pressing the cancel button and re-running the script adding a 2 to the end of the draft article name. More recently, I have pressed the wrong button by mistake (Try again instead of Cancel) and the script has run. Looking at User:John B123/Draftify log the first instance of 'Draft:Draft' was 15 May 2021. --John B123 (talk) 20:46, 23 August 2021 (UTC)[reply]
Still happening. I know you're AFK right now Evad so I'll try and suss out the issue and get an IntAdmin to fix it. Primefac (talk) 21:22, 1 March 2022 (UTC)[reply]
@John B123: Just a note that I've recently fixed this in my fork of this script. See if you want to switch. -MPGuy2824 (talk) 05:01, 19 March 2023 (UTC)[reply]

Move deleted article to draft

[edit]

How can a user with undeletion rights move a deleted article to draft? I see in the archive that earlier this was possible but you removed it. Jay (talk) 10:26, 17 November 2021 (UTC)[reply]

@Evad37: this was at the request of GeoffreyT2000, so trying to understand the reasoning behind removing this. Jay (talk) 06:29, 27 November 2021 (UTC)[reply]
@Evad37: it is a common requirement at RfU. For example, for these (WP:Requests for undeletion#Pibby, WP:Requests for undeletion#Elephant Robotics) I had to undelete followed by draftify, whereas a single-step process would have been simpler. Jay (talk) 06:26, 14 January 2022 (UTC)[reply]
 Acknowledged, it would be useful for admins. This would be a new feature, the earlier discussion you reference was the link unexpectedly appearing on non-existent pages (without any code to actually handle undeletions) - Evad37 [talk] 09:50, 14 January 2022 (UTC)[reply]

Weird problem with the script

[edit]

Hello, Evad37,

I'm running into a strange problem right now with your script, not with my use (I find it very helpful), but another editor. Somehow, they are able to suppress the redirect, which is fine, but then the script recreates the original page and tags it with a speedy deletion tag, CSD R2. So, there was no redirect left, then the page is created with a request to delete that page. I'm not sure if this page will be around when you see this message but an example is Noorpora. The editor involved, does not have page mover rights and should not be able to suppress the redirect but they might have some global privileges which enable them to do this. There is a discussion at User talk:Ts12rAc#Pravav.S.S.

I not only use your script frequently, but I also delete a lot of crossname space redirects left behind and I haven't run into this situation before. Sometimes new editors create User pages that only include a tag for their deletion but they are usually trying things out with tagging, this is the only situation I've run into with an experienced editor. Thanks for any insight you can provide. Liz Read! Talk! 20:22, 28 January 2022 (UTC)[reply]

This is the same issue as #Script should not violate global rights policy. If the script is going to check user rights to determine whether to add the R2 tag, then it can do that when determining whether to move without a redirect as well. * Pppery * it has begun... 20:24, 28 January 2022 (UTC)[reply]
I echo the sentiments by Czar in that thread --Megan B.... It’s all coming to me till the end of time 20:58, 28 January 2022 (UTC)[reply]
My response to that is that neither Czar nor Evad37 have the right to overrule Wikipedia:Global rights policy * Pppery * it has begun... 21:07, 28 January 2022 (UTC)[reply]
...no one is suggesting "let's overrule the global rights policy" so come on. Where have you stated your actual recommendation to resolve this? Are we looking at something like: (1) Make sure the redirect is unsuppressed, (2) tag for R2, and (3) then carry through the R2 deletion if the user has the rights or leave the R2 tag if the user does not? czar 04:09, 29 January 2022 (UTC)[reply]
@Evad37: Then, you should modify your script to create a new variable named "noRedirect" and move the code in lines 341 and 342 to another place so that administrators and page movers have "noRedirect = 1" and other users have "noRedirect = 0". Then, "noredirect: 1" should be replaced with "noredirect: noRedirect" at what is currently line 335 (which will inevitably shift to a different line number)., and "!noRedirect" or "noRedirect === 0" should then appear at what is currently line 340 (and now that the inside code is short enough, line 343 could be shifted up to the end of line 340). Again, the resulting line numbers will be shifted.
A Community Wishlist Survey proposal for this would then look like the following:
Extended content
  • Problem: When a global rollbacker draftifies an article using User:Evad37/MoveToDraft.js, the redirect is suppressed contrary to global rights policy and then a new page with just the R2 tag on it is created.
  • Who would benefit: Global rollbackers
  • Proposed solution: Make the script suppress the redirect only if the user is an administrator or a page mover.
  • More comments:
  • Phabricator tickets:
  • Proposer: Signature and timestamp
GeoffreyT2000 (talk) 16:15, 29 January 2022 (UTC)[reply]

Warn when draftifying articles that are too old

[edit]

Wikipedia:Village pump (policy)#Proposal to ban draftifying articles more than 90 days old without consensus found a consensus that articles that are too old shouldn't be draftified. Can the script warn the user if they try to do this? (The current threshold is 90 days, but this is subject to change.) – Joe (talk) 10:10, 24 March 2022 (UTC)[reply]

AfC Reviewer Notification

[edit]

Is it possible to, if draftiying an article that has been accepted by an AfC reviewer, send a notification of some sort to the reviewer as well as the original author? I like to keep track of the state of the articles I review for calibration purposes, so I watchlist AfD discussions, but if they're draftified I usually miss it. Thanks! Rusalkii (talk) 21:07, 1 April 2022 (UTC)[reply]

[edit]

Some links to incubated pages remain (remained) on Wikidata. For example, page of ru:Абу Хафс Умар II has a non-existent en-link. Also [2]. It's an old problem, maybe? --Proeksad (talk) 21:05, 20 May 2022 (UTC)[reply]

Feature request - combo box that lets you choose different text to post on user talk page

[edit]

Ideas for different user talk templates can be found at User:Onel5969/Draftify templates. Thanks to User:Onel5969 for sharing these. –Novem Linguae (talk) 19:35, 4 October 2022 (UTC)[reply]

Interface-protected edit request on 30 June 2023

[edit]
Evad's script with "unmaintained" message

Please make the changes shown in this diff, to this script. It adds a message to Evad's script's UI informing the user that a fork exists, and that the script that they are using is not being maintained. It doesn't change any other functionality.

Evad37 hasn't edited since October 2022 (except for a spurt of activity on 21st May). He has been informed of a discussion regarding this change (here) more than a week back.

The suggested fork has important warnings to help prevent folks from violating guidelines and best practices while using the script (see Changes after forking). -MPGuy2824 (talk) 04:17, 30 June 2023 (UTC)[reply]

 Done Izno (talk) 05:03, 30 June 2023 (UTC)[reply]