Jump to content

Template talk:R from Unicode character

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Paine Ellsworth (talk | contribs) at 16:18, 5 July 2014 (Bad code?: minor). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
WikiProject iconRedirect Template‑class
WikiProject iconThis page is within the scope of WikiProject Redirect, a collaborative effort to improve the standard of redirects and their categorization on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
Note: This banner should be placed on the talk pages of project, template and category pages that exist and operate to maintain redirects.
This banner is not designed to be placed on the talk pages of most redirects and almost never on the talk pages of mainspace redirects. For more information see the template documentation.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

Categorization

If you look at Category:Redirects from Unicode characters you'll see that each character is categorized under its own title. Can a change be made to this template so that it categorizes them all under the same title? It would be easier on the eyes, and for navigation. -- œ 13:34, 29 December 2011 (UTC)[reply]

Looks like the tilde (~) sort grabbed all of them except for six symbols at the very end. – PIE ( CLIMAX )  08:08, 16 February 2012 (UTC)[reply]
I took care of those six. I also added a table of contents that makes more sense for this category. Gorobay (talk) 03:58, 17 February 2012 (UTC)[reply]
Excellent! I added a TOP as in other TOCs. I've also taken the liberty to use that TOC in Unicode's parent: Category:Redirects from symbols. Your code is now in template form at {{Category TOC symbols}}. – PIE ( CLIMAX )  17:59, 18 February 2012 (UTC)[reply]

Bad code?

To editor Wbm1058: Where is that error again? I sandboxed the code and tested it at here at %, but I don't see a transcluded error. – Paine  23:46, 3 July 2014 (UTC)[reply]

I patrol for errors using these links:
You'll see that % shows up at the top of the main-namespace link. I think the only one that is supposed to be on that list (in the first 50) is Icelandic alphabet. I recall that being there before and have not taken the time to debug it. The others you can make go away by doing null edits (unless they use the sandbox). Wbm1058 (talk) 23:57, 3 July 2014 (UTC)[reply]
For some background on this, including some examples of how I fixed other templates with this issue, see Template talk:Requested move#template:error. Wbm1058 (talk) 00:28, 4 July 2014 (UTC)[reply]
I found the code in the sandbox that caused the error; however, all the code did was to produce its own error when the rcat tags a redirect in any other namespace besides mainspace and project namespace. This whispers to me that there may be a problem with {{Error}} if it doesn't show any kind of error box or message on the redirect, and it shows it's "mysteriously" transcluded. Something's up – let me make some checks. (Also found several "Unicodes" here in project space.)– Paine  01:01, 4 July 2014 (UTC)[reply]
Okay, Wbm1058, how well-versed are you in the Lua module code? The challenge seems to lie in the new, beta version of the {{Category handler}} template. I tested the old template wikimarkup in the Template:Category handler/sandbox (check Template:R from Unicode/sandbox) and the old markup does not produce the errors you found. It's only when the beta version of cat handler, which uses Module:Category handler, is transcluded to the rcat sandbox that the error is generated. Can you fix this? (I am Lua code-poor, myself) or should we seek help? – Paine  08:32, 4 July 2014 (UTC)[reply]
Also, there is the possibility that the actual problem lies in the Namespace detect module or its data page, which are called by the cat handler beta module. – Paine  08:59, 4 July 2014 (UTC)[reply]
PS. (This may be unlikely, though, since the cat handler sandbox also calls these.)
PPS. It may save some time to mention that I tried a workaround by use of cat handler's 2nd parameter, i.e., I set 2={{IRT|[[WP:Mainspace|main]]|[[WP:Project namespace|Wikipedia]]}} and other=2, but that also generated the error you found. PS & PPS left by – Paine 
Since the category handler template and module have been stable since last October, I doubt that they are the problem here. Looking at this diff the problem would seem to be in the highlighted text that was removed, more specifically I see that template:Incorrect redirect template can transclude {{error}}s, so I think that's probably the template that needs to be fixed, or something is transcluding {{Incorrect redirect template}} when nothing is incorrect. Wbm1058 (talk) 16:03, 4 July 2014 (UTC)[reply]
FYI. Someone fixed Icelandic alphabet. Wbm1058 (talk) 16:38, 4 July 2014 (UTC)[reply]
Yes, the IRT uses {{Error}}, but it is only called when the rcat is used to tag a redirect in any other namespace than main and project. It is not called if the redirect is in one of those two namespaces. You don't think it's suspicious that the sandbox version of the cat handler, which has the old template wikimarkup code, works just fine and does not return the error, but the new beta version that invokes the module does return the error? – Paine Ellsworth CLIMAX! 20:36, 4 July 2014 (UTC)[reply]
Oh, I see. I confirmed that. Let's try asking for help. Wbm1058 (talk) 14:53, 5 July 2014 (UTC)[reply]

@Mr. Stradivarius: Paine has found a difference in behavior between the old template:category handler and your new module. See this diff. Can you check how the module is processing the other parameter when a template transclusion (Paine's new template:Incorrect redirect template) is part of the parameter? Thanks, Wbm1058 (talk) 14:53, 5 July 2014 (UTC)[reply]

@Wbm1058 and Paine Ellsworth: Sorry, what? I'm afraid I don't quite understand what the issue here is. All parameters are expanded before they are passed to Lua, so it doesn't matter if a template transclusion is part of a parameter. All Lua sees is the expanded wikitext. I gather that something is happening with Module:Category handler that didn't happen with the old Template:Category handler, but I'm not sure exactly what that is. Can you point me to an example, or construct a minimal test case for me if you have managed to pin down the issue far enough? — Mr. Stradivarius ♪ talk ♪ 15:18, 5 July 2014 (UTC)[reply]
@Mr. Stradivarius: Use % for the test case. It is currently using {{R from Unicode/sandbox}}. Just do null edits to that, and see whether it appears at the top of this list. When template:R from Unicode/sandbox uses template:Category handler/sandbox (the old pre-module version) it does not show up at the top of the list, but when it uses template:Category handler (with the module), it does. Why is that? Wbm1058 (talk) 15:31, 5 July 2014 (UTC)[reply]

Hi, Mr. S. – I found that the {{R from Unicode}} rcat, which uses the cat handler to cat in the main and Wikipedia namespaces, was not showing an error box in the other namespaces to let editors know not to tag redirects in those namespaces. I tested the {{Incorrect redirect template}} in the "other=" param to generate the error box and to sort those redirects to Category:Pages with templates in the wrong namespace. After tests, I applied the change to the live template. Wbm1058 caught an error while monitoring this page. Scratched my head several times and found that somehow the cat handler module allows those errors to occur in both the main and Wikipedia namespaces, but with no other error indication on the redirects themselves. I put the cat handler's previously used template code in the cat handler sandbox and found that the template code works as it should. I used the % redirect to test this. When the cat handler's sandbox is used in the Unicode rcat, the % redirect disappears from the Error template's transclusion-list page. If I go back to the cat handler module (erase /sandbox from the Unicode rcat), then the % redirect reappears on the Error template's transclusion-list page. Something does seem amiss with the way the cat handler module's "other" param is behaving. Since I am still Lua-poor, I am unable to pinpoint the error in the module code, which might actually be generated elsewhere from an associated source. In any case, we are unable to use the Incorrect redirect template in the live Unicode rcat, because that would just fill up the Error template's transclusion-list page – again. The Unicode symbols that are now on that list can be erased by null edits. Help! – Paine Ellsworth CLIMAX! 16:07, 5 July 2014 (UTC)[reply]