Module talk:Rail: Difference between revisions

Content deleted Content added
?
Cewbot (talk | contribs)
m Maintain {{WPBS}}: 1 WikiProject template. Create {{WPBS}}.
 
(10 intermediate revisions by 4 users not shown)
Line 1:
{{WikiProject Trains}}
{{Old RfD |date=3 February 2019 |result='''no consensus''' |page=2019 February 22#Module:Rail}}
{{WikiProject banner shell|
{{WikiProject Trains}}
}}
 
==Module redirect==
{{to|Dekimasu}} just out of curiosity, would this be a soft redirect or a hard one.? If invoked, would it behave just like [[:Module:Adjacent stations]]? (Note above that this was nominated for discussion at '''Rfd'''.) '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">Paine&nbsp;Ellsworth</span>]]'''''<small>,&nbsp;ed.&nbsp;&nbsp;[[User talk:Paine Ellsworth|<sup>put'r&nbsp;there</sup>]]&nbsp;</small>&nbsp;<small>01:41, 15 March 2019 (UTC)</small>
 
{{to|Dekimasu}} probably should have just asked you if you know if this works at all as a true module redirect. Not questioning that redirects cannot be left behind during a module move; however, I do wonder if a redirect like this one could be ''manually'' left behind rather than adjusting all the templates and modules where a moved module was invoked? '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">Paine&nbsp;Ellsworth</span>]]'''''<small>,&nbsp;ed.&nbsp;&nbsp;[[User talk:Paine Ellsworth|<sup>put'r&nbsp;there</sup>]]&nbsp;</small>&nbsp;<small>18:06, 21 March 2019 (UTC)</small>
:No, it is technically not possible to redirect to a module. When a module is invoked, the module is executed with the result being a table that the caller can use in any way that works. What is possible is for someone to check how a particular module works at the moment and put some very small code at the "redirect" page which executes the target module and returns its table. However, that is different from #REDIRECT. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 23:44, 21 March 2019 (UTC)
:I just noticed a relevant report at [[Wikipedia:Administrators' noticeboard#Blue linked module page with an empty history]]. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 23:55, 21 March 2019 (UTC)
:Hi [[User:Paine Ellsworth|Paine]], I have been trying to stay away from the recent module discussions, particularly the move requests, and I'm not sure I can answer your questions intelligently. Hopefully at some point I will be able to deal with these issues more easily, but to me it seems like changing module setups through [[WP:RM]] or [[WP:RFD]] is asking for trouble. I think the RFC at [[Wikipedia talk:Templates for discussion]] may clean up some of the process issues and put editors who are technically proficient with the modules in charge of future changes. [[User:Dekimasu|Dekimasu]]<small>[[User talk:Dekimasu|よ!]]</small> 04:19, 22 March 2019 (UTC)
: {{ping|Paine Ellsworth}} It's a hard redirect in that {{mlx|Rail|...}} is equivalent to {{mlx|Adjacent stations|...}}. The only way in which it is not a redirect is that actually viewing [[Module:Rail]] doesn't get redirected, making this work in much the same way as a template redirect that is nominated at RfD. [[User:Pppery|&#123;&#123;3x&#124;p&#125;&#125;ery]] ([[User talk:Pppery|talk]]) 17:27, 24 March 2019 (UTC)
::We have two views: [[User:Pppery|yours]] is that [[:Module:Rail]] behaves as a hard redirect when invoked, and [[User:Johnuniq|Johnuniq]]'s is that it's technically not possible to redirect to a module, and rightly means that to "put some very small code at the 'redirect' page which executes the target module and returns its table" is different by definition from #[[WP:REDIRECT|REDIRECT]]. This all seems to me to mean that while this module is not by definition a redirect, it does behave as one by "calling" [[:Module:Adjacent stations]] when it's invoked. Has this been tested? Maybe if we ask [[User:Ythlev|Ythlev]], who set out to improve ''Module:Adjacent stations'' by creating this module? And if testing has shown or will show that this is or is not an "effective" and useful "redirect", what then? Where do we go from there? '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">Paine&nbsp;Ellsworth</span>]]'''''<small>,&nbsp;ed.&nbsp;&nbsp;[[User talk:Paine Ellsworth|<sup>put'r&nbsp;there</sup>]]&nbsp;</small>&nbsp;<small>16:34, 26 March 2019 (UTC)</small>
:::I do not think that Pppery and I are saying different things. Using #REDIRECT in a module will result in a broken module (because it is not valid Lua) and will not act as a redirect. However, putting a small amount of code in a module will make it behave exactly like a redirect as far as #invoke is concerned. For an editor viewing the page, it will look somewhat like a soft redirect because it will not redirect them. An example is [[Module:Location map/data/New York]] which contains:
:::<code>return require('Module:Location map/data/USA New York')</code>
:::which acts like a redirect to [[Module:Location map/data/USA New York]]. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 20:18, 26 March 2019 (UTC)
::::So "acts like a redirect" then means that while this module is not a redirect in the usual sense, it is a special type of redirect that can be called a "module redirect". At present, renaming a module does not allow leaving a redirect behind. Should we perhaps consider getting the software to allow a page mover to choose whether or not to leave this special kind of "module redirect" behind following a module page move? '''''[[User:Paine Ellsworth|<span style="font-size:95%;color:darkblue;font-family:Segoe Script">Paine&nbsp;Ellsworth</span>]]'''''<small>,&nbsp;ed.&nbsp;&nbsp;[[User talk:Paine Ellsworth|<sup>put'r&nbsp;there</sup>]]&nbsp;</small>&nbsp;<small>23:28, 26 March 2019 (UTC)</small>
:::::There is a dormant request at [[phab:T120794]] to insert code in the original module when moving it. I'm not sure that pushing for that change would be worthwhile because modules should not be moved often and other clean up is required to accommodate a move. Sometimes the original module should be deleted rather than left with unused code that simulates a redirect. [[User:Johnuniq|Johnuniq]] ([[User talk:Johnuniq|talk]]) 00:13, 27 March 2019 (UTC)