Module talk:Requested move: Difference between revisions

Content deleted Content added
Line 3:
: {{strongbad|class=error|1=Invalid title detected in parameter "current2"; check for [[Wikipedia:Page name#Technical restrictions and limitations|invalid characters]] and incorrectly formatted [[Help:Interwiki linking|interwiki prefixes]]}}
errors, you didn't do a similar check on the '''new''n''''' parameters, and the module doesn't handle them gracefully, e.g., <nowiki>John Green (author) → [[:John Gr>een]]</nowiki> in a test I did. I created [[Module:Requested move/sandbox]] to work on this, but thought that you could do it in a fraction of the time it would take me. One of these days I'll take some more time to study Lua. Thanks, [[User:Wbm1058|Wbm1058]] ([[User talk:Wbm1058|talk]]) 19:37, 29 April 2014 (UTC)
:This wouldn't be hard to do, but there's a hidden penalty. At the moment, I'm checking for invalid titles by creating a title object with [[mw:Extension:Scribunto/Lua reference manual#mw.title.new|mw.title.new]]. That is an expensive function - every time it is called on a new page, the [[WP:EXPENSIVE|expensive parser function count]] is increased. And if the expensive function count for the whole page goes over 500 while the module is running, it will produce a script error. On a blank page, this would give us a limit of 250 pages (250 current + 250 new), and on a page that already contains lots of expensive parser functions, that number will be less. We can use [[mw:Extension:Scribunto/Lua reference manual#pcall|pcall]] to avoid the script error, but the fallback behaviour would be to treat valid titles as if they were invalid, which is just as bad. This would only be a problem if someone made a move request involving hundreds of pages, though - are you aware of any such requests that have happened in the past? <p>An alternative would be to not use mw.title.new, but to just check for bad characters in the title. This wouldn't increase the expensive function count, but it also wouldn't catch invalid interwiki prefixes. It would, however, have the advantage that we could tell the user exactly what character was invalid, e.g. 'invalid character ">" found in the "new3" parameter'. We could also check the current''n'' parameters with this check, as it seems like it might be useful. Do you think this is a good idea, and if so, what wording would you like for the error message? — '''''[[User:Mr. Stradivarius|<span style="color: #194D00; font-family: Palatino, Times, serif">Mr. Stradivarius</span>]]''''' <sup>[[User talk:Mr. Stradivarius|♪ talk ♪]]</sup> 04:50, 30 April 2014 (UTC)</p>
 
== Moving over a disambiguation page implies that a multi-move request should be submitted ==