Template talk:Move-multi

Latest comment: 10 years ago by Wbm1058 in topic Current page?


Subst:Move-multi

edit

Good news, everyone! I have invented a template, {{subst:move-multi}}, which is similar to {{subst:move}} except used for multi-moves. Up to 10 pages are supported. I have added the documentation to it on WP:RM (which I will put on the actual template documentation shortly). This should make it easier for people to file properly-formatted multi-moves. (I'm such a bureaucracy wonk. I am saying things like "properly-formatted multi-moves".) @harej 05:09, 28 November 2009 (UTC)Reply

For the record, the prior way of doing this still works, since all this template does is make doing that easier. If you have memorized how to do multi-moves, don't worry about learning this new way (unless you want to). @harej 05:19, 28 November 2009 (UTC)Reply
When you get time can you add support for 20 or 30 article moves? Eleven and twelve are not unheard of here. I think the Colombia move was closer to thirty. 199.125.109.102 (talk) 16:27, 28 November 2009 (UTC)Reply
I have added support for up to 20. Anything more would be an unnecessary server strain, considering how rare >20-article multimove requests are. (I have also based this standard on Template:Navbox, which supports a maximum of 20 rows). @harej 22:05, 28 November 2009 (UTC)Reply

Template limitations and documentation

edit

The template seems to support up to 20 articles, but:

  • This is not documented, and
  • The bot seems to support only 10. That is, only the first 10 in the list are displayed at WP:RM, and only the first 10 (actually 2-10) get notices on their talk pages about an ongoing discussion.

Whatever is supported and actually works should be clearly documented here. Thanks. --Born2cycle (talk) 21:01, 8 November 2010 (UTC)Reply

I am currently making an umbrella nomination for >20 articles to be renamed, so, yes, i'd like the documentation to direct me on how to do that properly. __meco (talk) 09:45, 20 November 2010 (UTC)Reply
I can tell you that stuff starts breaking if you go over 10, so I would break up the list into lists of 10, make separate requests for each bunch of 10 each per the instruction at WP:RM, but then point to one of them for the discussion about all. Hope that makes sense. --02:20, 21 November 2010 (UTC)

I just broke up a request with 49 items into groups of 10, but the bot failed to leave an announcement on the talk page of the 10th item in each list - so I had to add them manually. So currently it only works correctly for up to 9 items, not 10. --Born2cycle (talk) 09:02, 8 December 2010 (UTC)Reply

  Fixed Both the template and user:RMCD bot now support up to 30 moves in a multi-move request. Updating documentation is on my to-do list. –Wbm1058 (talk) 13:20, 29 August 2012 (UTC)Reply

Template needs to check for common user input error

edit

For an example, see this diff. From this, it appears that the editor cut&pasted from the instruction box at Wikipedia:Requested moves:

==Requested move==
{{subst:move-multi
| current1 = Current title of page 1, with the talk page hosting this discussion
| new1 = New title for page 1
| current2 = Current title of page 2
| new2 = New title for page 2
| current3 = Current title for page 3
| new3 = New title for page 3
| reason = Place here your rationale for the proposed page name change, ideally referring to applicable naming convention policies and guidelines, and providing evidence in support where appropriate. Do not sign this.

}}

and neglected to remove "current3" and "new3", as they were only proposing two page moves, not three. User:RM bot then runs with this and creates talk:Current title for page 3, which admins have had to delete several times. Perhaps his template can be modified to refuse to write the strings "title for page" and "title of page".

In the meantime, I'll update Wikipedia:Requested moves with "instructions for dummies" –Wbm1058 (talk) 14:34, 27 July 2012 (UTC)Reply

  Done I've added user input validation to the template, which if it detects unedited cut & paste as above, will default to "?" for the new page name, as in "be renamed and moved somewhere else, with the name being decided below." – Wbm1058 (talk) 13:14, 29 August 2012 (UTC)Reply

Signature

edit

Occasionally a single move request is supplemented during the course of discussion with other related pages. Changing {{requested move}} to {{move-multi}} automatically adds a signature of the user making the additions, which confusingly results in several signatures in a row. It's easily enough fixed with a second edit, but could someone create a parameter such as "|signature=no" to suppress this? The feature is unlikely to abused, and would be easily remedied by {{unsigned}} even if it were. --BDD (talk) 17:50, 30 October 2012 (UTC)Reply

Current page?

edit

Okay, I give up. Why can I not add:
{{subst:move-multi
| current1 = R33 World's Fair (New York City Subway car)
| new1 = R33 World's Fair
| current2 = R36 World's Fair (New York City Subway car)
| new2 = R36 World's Fair
| reason = Reason.
}}

To Talk:R33 World's Fair (New York City Subway car)? It keeps saying that the current1 page needs to be the current page, which it is. I tried it on some random pages and it works, but on some pages that have an RM in progress I get this error:

Parameter current1 must be R33 World's Fair (New York City Subway car).

What is going on? Apteva (talk) 22:14, 6 November 2012 (UTC)Reply

I don't have any quick answer for you, but note that parameter current1 is not required, and if you omit it it seems to work. – Wbm1058 (talk) 00:03, 14 November 2012 (UTC)Reply
See also Talk:AT&T, or Wikipedia talk:RM#Move request template not working and Talk:I'm a Celebrity...Get Me Out of Here! (UK TV series) Apteva (talk) 05:04, 19 November 2012 (UTC)Reply
It's a MediaWiki bug. See T37628. Rather than remove a useful edit check for user error from {{move-multi}}, I'll update its documentation to warn about this. When submitting move requests for articles with characters such as ampersands and apostrophes in their titles, simply omit parameter current1 as its use is unnecessary and optional. Thanks, Wbm1058 (talk) 14:52, 27 November 2012 (UTC)Reply
@Wbm1058: There may be movement on T37628 but couldn't we work around the bug by replacing {{{current1|}}} with {{PAGENAME:{{{current1|}}}}}, so the compared names end up equal whether or not they are affected by a PAGENAME transformation? PrimeHunter (talk) 03:08, 17 February 2014 (UTC)Reply
I think a Lua conversion would be a good way to fix this. As well as solving this immediate problem it would also remove the 30-page limit. I'll see if I can come up with some code later on. — Mr. Stradivarius ♪ talk ♪ 04:40, 17 February 2014 (UTC)Reply
I've now written Module:Move-multi, which can be tested with {{subst:move-multi/sandbox}}. I've commented some more about this at the current VPT discussion. — Mr. Stradivarius ♪ talk ♪ 14:03, 17 February 2014 (UTC)Reply
It seems that most of template namespace is rapidly being converted to module-namespace, so my tenure as a template editor may be limited. Something I was attempting to do here was to transclude {{error}} (another template that has been moduled) so that in theory, pages transcluding {{error}} could be easily isolated so that the errors could be addressed and corrected. I was thwarted in that effort because dozens of pages transclude {{error}} when there is really no error at all, making it difficult to find the true errors. I don't know whether the module will still transclude errors. A module that supported both {{move}} and {{move-multi}} error-checking with the same code would be nice, as their error-checking logic is redundant. Wbm1058 (talk) 15:28, 17 February 2014 (UTC)Reply
The module is always substituted, just like the current template; this means that the wikitext that ends up on the final page will be the actual {{error}} template, rather than a Lua copy of it. I have some more thoughts about the implementation, but this is getting off-topic for this thread, so I'll post them at Template talk:Requested move instead. — Mr. Stradivarius ♪ talk ♪ 15:45, 18 February 2014 (UTC)Reply
I should mention that there is one exception to the module using the actual {{error}} template - when it is transcluded instead of substituted, and it triggers the substitution error. That error uses <strong class="error"></strong> tags rather than the template, as if the module just outputted the {{error}} invocation, the wikitext wouldn't be expanded. That can be fixed if you like, but the same trick has been used in lots of other modules, as it is generally better coding practice to not expand templates from Lua when the same thing can be done in Lua code. — Mr. Stradivarius ♪ talk ♪ 16:21, 18 February 2014 (UTC)Reply
@Mr. Stradivarius: {{Move-multi}}, {{RMtalk}} and {{Requested move}} all use Template:Require subst to require substitution. See Template talk:RMtalk/testcases for examples showing the error message shown when transcluded. This message does transclude {{error}}, as it should. This is precisely the type of user {{error}} I want to find when I check what-links-here for transclusions. Indeed checking for article-space transclusions of {{Require subst}} I find Gerard Dubois, where a user error in submitting a requested move has gone undetected for two weeks. Template:Require subst does not populate any categories, so that is the only way to easily find these user errors. As an aside, look at Talk:Cost–benefit analysis/Archives/2014#Editing Page where I found another tool that is creating {{error}}s—this use of the error template is one that I'm less keen about, because it isn't really an error; it's just an omission of the author for a citation that I find often needs to be "fixed" with |author=<!--Staff writer(s); no by-line.-->. Such "errors" I would rather not transclude, but just categorize as "something that should be checked by someone sometime", similar to Category:Orphaned articles. – Wbm1058 (talk) 15:18, 22 February 2014 (UTC)Reply

How about creating an error tracking category for the module? That would be easy to do, and would avoid you having to search through errors and non-errors in unrelated templates. I'm not so keen on making Lua-based wikitext error messages transclude {{error}}, as it's not good coding practice to expand templates from Lua when you can avoid it; it means you have to go through the MediaWiki parser, which is slower than sticking to pure Lua code. It would be better coding to use Module:Error directly. Having said that, there are plenty of modules in existence which don't bother to do that, which means error categories are probably the only way that you can reliably implement centralised error detection. — Mr. Stradivarius ♪ talk ♪ 15:38, 22 February 2014 (UTC)Reply

OK, I see that I am going against the grain by wanting to do this by tracking transclusions. What I want to avoid is creating dozens of "once-in-a-blue-moon-error" categories each tracking different rarely occurring editor template usage errors. The "clueless-edit" patrol would be burdened with checking the contents of each of these error categories, which would often be empty, frequently to ensure that they were responded to on a timely basis. What is usually needed is giving a novice editor a helping hand. There should just be a single bucket for all of them. So how about this. Can you modify module:error so that it automatically populates Category:Template:Error each and every time that "{{error}}" is actually executed by the module code? Wbm1058 (talk) 16:10, 22 February 2014 (UTC)Reply
Or alternatively the categorization can be done in Template:Error right before it invokes the module? This would limit categorization to template usage, allowing editors who did not want their errors categorized to bypass that by invoking the module directly. Wbm1058 (talk) 17:06, 22 February 2014 (UTC)Reply
Continuing my train of thought, regarding this fix to avoid transcluding false-positives, would either:
  • <strong class="error">error message</strong> (direct use of CSS)
  • {{#invoke:Error|error|error message|tag=}} (bypass the template and call the module directly)
accomplish the same thing? So, if the module:Requested move "Subst check" doesn't transclude template:error or transclude (invoke) module:error directly, then it should populate Category:Template:Error or Category:Module:Error directly, depending on which populates the category (we probably don't need both). – Wbm1058 (talk) 19:46, 22 February 2014 (UTC)Reply