User talk:Amorymeltzer

From Wikipedia!
Jump to navigation Jump to search

Import request[edit]

Can you help me to import missing templates on the page from enwiki? Thanks. --Xiplus (talk) 02:12, 20 October 2019 (UTC)

Why? What are you testing? ~ Amory (utc) 09:29, 20 October 2019 (UTC)
I want to test Twinkle. I guess Twinkle will be broken when tagging a article that all tags are already present. --Xiplus (talk) 09:33, 20 October 2019 (UTC)
Twinkle should work just fine. Obviously some things, most notably removing article maintenance tags, won't work unless those templates exist here, but it should be largely fine. If there's one or two templates you are interested, I can help you out, but for testing Twinkle you shouldn't need a mass-import. ~ Amory (utc) 09:53, 20 October 2019 (UTC)
[1] Morebits.quickForm.getElements(form, 'articleTags') will return null when all tags are already present. So forEach will be broken I guess. --Xiplus (talk) 10:31, 20 October 2019 (UTC)
Right, that's what I was saying above: it works fine if the tags in question are present and imported. If you're just learning how to use Twinkle, you shouldn't need hundreds of templates to check that it works, a handful will do. So for example, removing and adding Template:Lead too short or Template:Lead missing should work fine, even if you've got Template:Lead too long in there; as far as I've seen it doesn't break anything. ~ Amory (utc) 10:47, 20 October 2019 (UTC)
Morebits.quickForm.getElements(form, 'articleTags') will return null. So you will get Uncaught TypeError: Cannot read property 'forEach' of null. To prove it without importing all templates. You can leave 1 template in Twinkle.tag.article.tags and open tag feature in the article which tagged the template.--Xiplus (talk) 11:34, 20 October 2019 (UTC)
Can you clarify what steps you are taking (what actions in the tag module, what page revision, etc.) so I can replicate this error? ~ Amory (utc) 13:18, 20 October 2019 (UTC)


  1. Change Twinkle.tag.article.tags in MediaWiki:Gadget-friendlytag.js to
    Twinkle.tag.article.tags = {
    	'Cleanup': 'requires cleanup'
  2. Make sure your "Custom article/draft maintenance tags" setting is empty.
  3. Tag a article with {{Cleanup}}.
  4. Open tag feature on this article. You should see nothing to tag. One tag ({{Cleanup}}) is able to untag.
  5. Check browser's console log.

--Xiplus (talk) 13:36, 20 October 2019 (UTC)

@Xiplus Ahhh okay, I understand you now. That seems unlikely, but yet it is a bug! I'll open a PR for a fix in a moment, sorry for the misunderstanding. ~ Amory (utc) 21:28, 20 October 2019 (UTC)