Wikipedia talk:AutoEd
Curlyfixer breaking images
[edit]Please see this edit for an example. 81567518W (talk) 13:19, 26 November 2025 (UTC)
- I think the proper solution is to rename the file so it doesn't contain curly braces. I've filed a rename request. Aaron Liu (talk) 02:49, 12 December 2025 (UTC)
Running AutoEd
[edit]Hello! Apologies for my naiveté. I've just installed Auto Ed and it shows up in my tools dropdown. When I click it, it opens my editor, but nothing else happens? This seems like the same problem mentioned above, but I'm not sure where or how to install the "Show an alert when you encounter JavaScript errors" gadget. I do see some errors in the console but they're not descriptive enough for me to see a clear cause. Veggiegalaxy (talk) 18:18, 4 December 2025 (UTC)
- Hum. I found and enabled the "show me an alert when you encounter javascript errors" but still no dice. Veggiegalaxy (talk) 18:21, 4 December 2025 (UTC)
- Veggiegalaxy, perhaps you could say what the errors are? Are they related to autoed? Does this still happen when you disable everything except autoed? — Qwerfjkltalk 18:26, 4 December 2025 (UTC)
- Hi @Qwerfjkl! Sure. Here they are. They don't seem to be related to auto ed. Also, sorry, but what is the best way to disable everything except auto ed? Let me poke around in settings.
- mw.xLab.getExperiment(): The "xlab-mw-module-loaded-v2" experiment isn't registered. Is the experiment configured and running?
- index.js:70 mw.xLab.getExperiment(): The "logged-out-retention-round2" experiment isn't registered. Is the experiment configured and running?
- index.js:70 mw.xLab.getExperiment(): The "sticky-headers" experiment isn't registered. Is the experiment configured and running?
- startup.js:1319 This page is using the deprecated ResourceLoader module "jquery.ui".
- Please use Codex instead.
- execute @ startup.js:1319Understand this warning
- startup.js:1319 This page is using the deprecated ResourceLoader module "moment".
- [1.44] Use mediawiki.DateFormatter or native Intl function instead. See https://phabricator.wikimedia.org/T146798 Veggiegalaxy (talk) 18:35, 4 December 2025 (UTC)
- Veggiegalaxy, none of those look related, you're correct. The easiest way to only run autoed is to run the page in safemode (
?safemode=1) and then runimportScript('Wikipedia:AutoEd/complete.js');(or whichever variant you used) in the developer console. — Qwerfjkltalk 18:38, 4 December 2025 (UTC)- @Qwerfjkl Hm, okay. I just chose a page at random, and appended safemode:
- https://en.wikipedia.org/wiki/Sri_Ksetra_kingdom?safemode=1
- I ran
importScript('Wikipedia:AutoEd/complete.js');in the console and it returned<script src="/w/index.php?title=Wikipedia:AutoEd/complete.js&action=raw&ctype=text/javascript"></script> - but not sure what to do with that? Veggiegalaxy (talk) 18:45, 4 December 2025 (UTC)
- Veggiegalaxy, well, then you see if autoed works. (But I think autoed loads on the editing pages, not when viewing the article?) — Qwerfjkltalk 19:34, 4 December 2025 (UTC)
- @Qwerfjkl For some reason... it's now suddenly working. Thanks for talking me through it! Veggiegalaxy (talk) 19:37, 4 December 2025 (UTC)
- Veggiegalaxy, well, then you see if autoed works. (But I think autoed loads on the editing pages, not when viewing the article?) — Qwerfjkltalk 19:34, 4 December 2025 (UTC)
- Veggiegalaxy, none of those look related, you're correct. The easiest way to only run autoed is to run the page in safemode (
- Veggiegalaxy, perhaps you could say what the errors are? Are they related to autoed? Does this still happen when you disable everything except autoed? — Qwerfjkltalk 18:26, 4 December 2025 (UTC)
Customization
[edit]The instructions for customization state:
To change the variables, just copy the following into your monobook.js page, where you should also have the "basic" preset imported ...
My monobook.js doesn't exist, so I dont have any "basic" preset imported. Where do I get this, and how do I import it?
Thanks --Lexiconaut (talk) 05:39, 22 December 2025 (UTC)
- The page you want to edit is User:Lexiconaut/common.js. See User:Jonesey95/vector-2022.js, where I import some AutoEd scripts. I don't use the basic.js or complete.js scripts, preferring to run only code that I have written, but if you remove the // comment characters and paste the basic.js line into your common.js, you might be able to get things to work. – Jonesey95 (talk) 00:46, 23 December 2025 (UTC)
- Thank you! That worked. --Lexiconaut (talk) 01:08, 23 December 2025 (UTC)
Breaking legitimately-tightly close links or e.g. some chemical names and formulae
[edit]It breaks legitimate constructions like e.g.
[[Carbon|C]][[Hydrogen|H]]₄(CH₄)benzo[''e''][1,4]diazepine(benzo[e][1,4]diazepine)[Co(NH₃)₆][Cr(CN)₆](both-ion coordination complex salts)
by adding a space between ] and [.
(See e.g. my revert 1340002663, btw with edit link in summary.)
Rude str = str.replace(/\]\[/g, "] [") in links.js is to blame.
--Mykhal (talk) 16:15, 23 February 2026 (UTC)
- Things like the individual elements in CH4 probably shouldn't be linked, but you're right that the script breaks "(+)-sparteine surrogate"
I guess we might want to remove that line. I'm not sure if I should file an edit request though because I'm unsure how often that line is used. Aaron Liu (talk) 16:56, 23 February 2026 (UTC)- This was only one of many examples, see more my today's edits. But I would't entirely exclude a possibility that it's fixing some much more common real issue. —Mykhal (talk) 17:38, 23 February 2026 (UTC)
- Yeah, I did mean examples of any real issue it's fixing. Aaron Liu (talk) 02:11, 24 February 2026 (UTC)
- This was only one of many examples, see more my today's edits. But I would't entirely exclude a possibility that it's fixing some much more common real issue. —Mykhal (talk) 17:38, 23 February 2026 (UTC)
Where it?
[edit]After an afternoon editing stoppage, my auto ed tab disappeared. Any suggestions? Regards Keith-264 (talk) 21:09, 5 March 2026 (UTC)
- All user scripts have been temporarily disabled due to a misstep during security testing. – Jonesey95 (talk) 22:03, 5 March 2026 (UTC)
- Ah, thanks Keith-264 (talk) 22:38, 5 March 2026 (UTC)
bug: Doesn't respect nowiki tag
[edit]On the article Web design, I recently fixed up some poorly place <nowiki> tags and discovered that this script isn't respecting those tags. As of writing, there's an instance of the following code snippet which this script attempts to transform into a wikitext table: <code><nowiki><table></nowiki></code>. Newtbytes (talk) 01:17, 20 April 2026 (UTC)
- I think this case is rare enough to not matter. Aaron Liu (talk) 14:39, 20 April 2026 (UTC)
- I would disagree; clearly it's common enough that I encountered it. This bug would likely affect any article that has HTML example code, which is pretty significant. Newtbytes (talk) 18:01, 20 April 2026 (UTC)
- I imagine that this bug isn't in this specific script (referring to Wikipedia:AutoEd/htmltowikitext.js) since ignoring nowiki tags is probably something that any AutoEd module that transforms wikitext should respect. Perhaps the fix is ensuring that AutoEd modules ignore content in nowiki tags. Newtbytes (talk) 18:02, 20 April 2026 (UTC)
- Ignoring nowiki everywhere is hard for multiple reasons, the one with the easiest explanation being that AutoEd doesn't parse Wikitext and instead is mostly regular expressions (advanced find-and-replace).The
<table>case mentioned only happens on two articles and doesn't seem to appear anywhere else outside of discussion pages. I cannot think of a way to fix this case just in htmltowikitext without using way too much performance resources since this change would not produce a benefit anywhere it is run other than those two articles (AutoEd usually is not run on discussion pages). Aaron Liu (talk) 22:53, 20 April 2026 (UTC)- Now that I think about it, I guess replacing all nowiki content first with some garbage string and then replacing the garbage string at the end could work (ignoring the modular limitations I've mentioned above so I'm assuming this approach is just something we're considering for the htmltowikitext module). I still need to see some more examples of the htmltowiki replacing stuff in nowiki tags to justify implementing this, though. Aaron Liu (talk) 22:58, 20 April 2026 (UTC)
- I found a better search query for the <table> example: [1]. There are actually four instances where AutoEd would erroneously replace tables that should not be wikitext tables. Table isn't the only tag that theoretically could be affected, for example <b>, <i>, <br>, and others, though search is a bit slower for those and times out so I can't find any specific instances. Newtbytes (talk) 23:50, 20 April 2026 (UTC)
- The biggest reason, requiring a lot of explanation, deals with how AutoEd is modular. You can yourself modify how everything is applied. There's no base module of things to do before or after all the other modules, so the only way to break the 15-year–long assumption that AutoEd will not itself prevent you from handling nowiki tags. Other editors might have written their own AutoEd scripts to do things onto nowiki tags. Aaron Liu (talk) 23:01, 20 April 2026 (UTC)
- Perhaps then it could be handled in the default main function if that is such a thing? Or it could be handled at the point each module is called, if that's possible. I don't know anything about how AutoEd is structured architecturally so my understanding of how it could work is probably pretty flawed. Newtbytes (talk) 23:53, 20 April 2026 (UTC)
- Ignoring nowiki everywhere is hard for multiple reasons, the one with the easiest explanation being that AutoEd doesn't parse Wikitext and instead is mostly regular expressions (advanced find-and-replace).The