User talk:GenQuest/Merge

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Merge template problems[edit]

As you probably already know, if you copy-paste the RM template code you produce, it doesn't actually produce the same rendering as shown in the blue box below it. Instead, it produces this:

The following discussion is an archived discussion of a

Merge Proposal and / or Redirect. Please do not modify it.
The result of the request for the Proposed Merger of {requested article} into this talk page's article was:


— — — — —

[discussion]

— — — — —
The above discussion is preserved as an archive of a WP:PM.

Please do not modify it.
Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section.

Mathglot (talk) 02:23, 29 April 2019 (UTC)[reply]

A copy of this template can be found here.

That doesn't match the rendered output shown on the page below the copy-paste sections, which is this:

box headed by "gives the following output"
The following discussion is an archived discussion of a Merger Proposal and Redirect. Please do not modify it.
Subsequent comments should be made in a new section on the target talk page. No further edits should be made to this section.
The result of the Proposed Merger of {requested article} to here was: Not Done — No Consensus to Merge. Consensus Reached – Awaiting Merge. Completed per Request.

[discussion]

The above discussion is preserved as an archive of a requested merge. Please do not modify it.
Subsequent comments should be made in a new section on this talk page. No further edits should be made to this section. User User Talk
A copy of this template can be found here

The copy-paste section has different line-breaks, italicization, and bolding. But there's a more serious problem: it has non-HTML compliant code and mismatched wiki metacharacters, which breaks syntax highlighting for discussions following it, and may have other knock-on effects on any page where the copy-paste text is placed. (I recently ran into this and was tearing my hair out, trying to figure out what was wrong with my TP entry, until I realized it wasn't me.)

The code has the following non-compliant issues:

  1. mismatched tags: the first template has two end-tags ( </br> ) and no begin tags, and the second template has one begin, and two end-tags. But...
  2. invalid tags: [but] it's worse than that, since there is no such thing as </br> in HTML at all; it doesn't exist—you can never use this under any conditions. My recommendation: use <br/>, but see below.
  3. invalid style attribute in span: <span style="color:red" "font:bold"> – the entire style attribute has to have one set of double quotes containing all the param:value pairs, not two sets. (This is only in the cut-paste version; the rendered version is coded correctly.)
  4. unmatched italic-bold in ''' Completed per Request''''' is unmatched. This might be just in the cut-paste version; haven't verified it in the other.

Fixing these issues will make the code compliant, so it won't interfere with other discussions. Break tags should appear by themselves, and not in pairs, and can be coded either as <br>, or, for XHMTL-compliance, br tags should be self-closed, thus: <br/>. But it may be that mediawiki software isn't XHTML compliant (I suspect it isn't) in which case, it's better to avoid the tag entirely and code the template {{br}}instead.

Fixing these issues won't make the cut-paste code look like the bottom rendered box, though; there's an entire sentence that is different, and line-breaks, italicization, and bolding will still be different. But at least it won't break stuff following it.

If you want a tip, I think the combo of bolding and italics using wiki-markup apostrophes is making it difficult for you to get the rendering the way you want in the cut-paste version, because there are so many of them one gets lost; HTML markup is more robust, so you might consider switching to: <span style="font-weight:italic">. An even better way: instead of doubling up on the apostrophes for the cut-paste version, just enclose the entire template in a balanced nowiki-tag pair: <code><nowiki>All of your template code here</nowiki></code>, and then your cut-paste code should work exactly right, and be identical to the rendered version, except for the enveloping tags. If you ever have to change the code, no big deal to get the cut-paste version: you just copy the whole thing and put the tag-pair around it, and you're done.

Some people appear to be using your template code, so if you could fix it, I'd appreciate it. The other thing is, have you considered making it into an actual template, instead of cut-paste code? It will make your life easier, as well as anybody who wants to invoke it; they can invoke it the regular way, with curly brackets, instead of cutting and pasting anything. For example, User:Mathglot/sandbox/Templates/template one is an actual template; it doesn't do a hell of a lot, here's an invocation of it:

template one Here's where I'd stick a template to test

but you can just copy your template code into its own page and invoke it, and then instead of trying to work out how to create the cut-paste version, you just write a few words explaining how to use it instead, or create your own /doc page. If you want help doing this, let me know. You're welcome to browse any of my sandbox templates at User:Mathglot/sandbox/Templates for examples. The last one on there, became a real template, and is now at Template:WikiEd banner shell. HTH, Mathglot (talk) 02:23, 29 April 2019 (UTC)[reply]

Hey, @Mathglot:. Thank you so much for the input. As you can tell from the template, I really am not much of a coder. I would need some guidance on setting the thing up as its own template, but would be willing to try. I am pretty-much self taught from working on Wikipedia and may have gotten a few things wrong...  ;-) If you can possibly brush those templates up and make "real" templates out of them, or show me how, I would be in your debt.
So you know, I am about to start a new job in the AM, and am leaving tomorrow morning for a five week business trip; and I am not too sure what kind of time sink I'm getting myself into. I probably won't be editing as much as I have been lately – at least for the first little bit. Any of your ideas would be welcome. Thanks again. Regards, GenQuest "Talk to Me" 06:40, 29 April 2019 (UTC)[reply]