Forum:Templates and the RTE

Much to my chagrin, it seems that the RTE's visual template parameters...do-dad...is mangling the source code for template calls. I realize that's not exactly clear, so, context! :D

The template I'm referring to can be found here. Here's a copy of what the source code of the template call should look like, ordered logically:

I've left a note at the top of the relevant page that this template should be edited in source mode, not visual, but it seems to fall on deaf ears. Here's what the RTE will spit-out:

togglec0 is an optional parameter I stuck in there, but doesn't do anything yet. I might implement that feature at some point. Leaving it in was a heck of a lot easier than leaving it out. The brace parameters are again, optional, and all should be at the bottom for consistency's sake when it comes to optional parameters. (I don't even know what image.png is; probably a stray parameter somewhere that needs to be cleaned-up.)

That brings me to how the visual editor mangles the order of parameters. It's just reading the template code, and then presenting them to the editor (in visual mode) as it finds them. But, that's not logical ordering. Parameter good 3, 3a, and 3b are all stuck before the sub-parameters for good1, good 2b comes before good2, etc. This template's code can't be read top-to-bottom to find the order of table cells from top-to-bottom (let alone right-to-left), not really, anyway.

The end result is something that's a bloody nightmare to understand when using the visual editor, and I don't think hitting users with a bigger, bolder stick at the top of the page where the template is used is going to help.

Is there any way that I can tell Wikia's RTE to display the parameters in a particular order? Some sort of way to override it's default behaviour?

And while we're on the subject of Wikia's RTE, why the heck doesn't it remove comment tags from the template parameters? If I write, then the visual editor returns a box titled "good3" with the text. You can probably see how this would annoy editors in visual mode, as not only are parameters out-of-order, so are comments about those parameters! >.<

So, any help on this would be awesome. Else...I'll just have to wait for the coders at Wikia to give us the tools to force the RTE to behave. -.- --Crimsonphoenixca 05:52, December 4, 2011 (UTC)


 * You can disable RTE on individual pages by using the Magic Word __NOWYSIWYG__ --Gardimuer { ʈalk } 07:30, December 4, 2011 (UTC)


 * Sadly, the RTE and the template editor in particular are still pretty buggy and thus such issues will occur. It would be good idea to report the bug through Special:Contact. — Sovq 07:37, December 4, 2011 (UTC)


 * Well, at least there's a way of beating users with a bigger stick then. lol Thanks for the info. I don't think it's so much a bug as an inconvenient lack of a feature for template editors (that is, some way to tell the visual editors that is the order to display parameters, and not how it's found in the template code). Ah well. Off to the contact page to request someone write some more code. --Crimsonphoenixca 13:30, December 4, 2011 (UTC)


 * I just thought of a workaround for this behaviour. If I add a parser function as the first line, and then list all of the parameters in order, it should resolve this. Like so:


 * The visual editor actually returns the parameters in the right order (1, 2, 3, 4). I guess it reads inside noinclude tags too. If wikia's programmers foresaw my issue and had their visual editor look for parameters within noinclude tags for that reason, well, my hat's off to 'em. This tip should probably be added to the help pages somewhere. >.>
 * Better still, now I don't have to annoy users by ripping out their visual editor. :) --Crimsonphoenixca 13:45, December 4, 2011 (UTC)


 * Tagging FAQ. -- Fandyllic (talk &middot; contr) 7 Dec 2011 2:43 PM Pacific