Template talk:Official website

From Wikipedia, the free encyclopedia
Jump to: navigation, search

Problem with Template:' used in website description[edit]

This markup currently causes errors:

{{Official website|http://www.sho.com/site/dexter/home.sho|''Dexter''{{'}}s official website}} on [[Showtime (TV network)|Showtime]]

renders as:

Dexter's official website on Showtime

Can this be fixed? Or does it have to be worked around? – Jonesey95 (talk) 15:12, 29 June 2017 (UTC)

I played around in the sandbox and added a hack just for the apostrophe you can see in the testcases (last entry). However this isn't the right way; the problem is with Module:URL. -- GreenC 16:15, 29 June 2017 (UTC)
I fixed Module:URL so it no longer includes <wbr/> inside HTML/XML tags. The above example should now work as intended (with the exception of a small gap in the underline due to the padding that {{'}} inserts). --Ahecht (TALK
) 20:49, 29 June 2017 (UTC)
Thank you! – Jonesey95 (talk) 02:44, 30 June 2017 (UTC)
@Ahecht: Hello. (Sigh!) I thought we were supposed to test changes to widely used templates thoroughly. You tested it for the cases you want it to work for but you didn't test it for potentially unwanted results. Why didn't you? That's very irresponsible for a template editor.
I will perform addition tests and share results.
Best regards,
Codename Lisa (talk) 06:10, 30 June 2017 (UTC)
And bingo! I found one. If the title has non-HTML < and > in it, it won't get formatted.
The solution, of course, is simple: Do not insert <wbr/> in the first place if a text label is supplied. In other words, supply the <wbr/> only if a single URL is passed to the template and what's being formatted is a printer-friendly form of URL.
Best regards,
Codename Lisa (talk) 06:50, 30 June 2017 (UTC)
@Ahecht and GreenC: Alright. I made this change to the sandbox: Revision 788227414. But we seem to have unexpected outcome: Module talk:URL/testcases. Is it okay with you two?
Best regards,
Codename Lisa (talk) 07:10, 30 June 2017 (UTC)
Yes changes should be done in the sandbox and checked against the testcases page. Other than that I have nothing to add because I don't fully understand the wbr tag purpose and how widely it applies and why the one case is failing or how important it is. -- GreenC 13:45, 30 June 2017 (UTC)
The <wbr /> is totally pointless in {{Official website}}. It is for {{URL}} only, which must display printer-friendly website links in the tight spaces of the infoboxes. Basically, this tag tells the browser: "You can break the string to the next line here, even though you might normally not."
Best regards,
Codename Lisa (talk) 14:29, 30 June 2017 (UTC)
The unexpected outcome do you mean the 1964thetribute.com red X in testcases? Will that impact uses of {{URL}}? Granted it looks like a rare case. -- GreenC 15:21, 30 June 2017 (UTC)
If you want my opinion, I think we can safely disregard it. Additionally, the second parameter of {{URL}} is deprecated anyway. That means we must provide no support for it, other than removing it from the articles. But you know the rules: Communicating with Ahecht is mandatory. —Best regards, Codename Lisa (talk) 15:34, 30 June 2017 (UTC)
Oh, good! With an attitude like that, there is sure to be more edit warring in the future and maybe even another ANI case when the changes go live. 2601:5C2:200:31AE:3D52:5ACE:5878:130C (talk) 23:58, 30 June 2017 (UTC)
The "attitude" is your own. CNL is seeking input to a sandbox edit. Do you have some alternative code to contribute? -- GreenC 03:27, 1 July 2017 (UTC)
@Codename Lisa: Communicating Ahecht was mandatory before reverting. The only thing that saves you from the trouble of going to ANI and facing the music is that the code was indeed faulty. (I organized a proposal for the responsibilities of template editors in the case of a dispute. While admins agreed with my former statement, they held a particular exception in the event that the code is faulty. I think it was Johnuniq who said bad edits must be reverted with all due haste.) There is another matter and that is the fact that there is bad blood between you and Ahecht, as he had been engaged in pervasive reversion of your contributions one or two month ago. Again, I am not saying what you did was a retaliatory reversion. (If anything, the retaliation would have appeared two month ago.) I am saying that you must have taken the extra precaution of documenting the template's fault before reverting. Perhaps, taking a screenshot from the crime scenefault scene?
And now? Ahecht will return after some time away and discover that the fault that he has "fixed" is still in the wild and blames you for it. Your intention to communicate after the fact is what doesn't matter to him. And Green Cardamom has already reviewed your change. So: Deploy the fix. Waste no more time. FleetCommand (Speak your mind!) 13:27, 1 July 2017 (UTC)
Wilco. I deployed the fix. —Best regards, Codename Lisa (talk) 13:31, 1 July 2017 (UTC)
I did test it against several testcases, I'm sorry I missed the one particular corner case that was cited, but I thought erring on the side of not breaking HTML/XML tags was worth the occasional URL that doesn't wrap in certain versions of certain browsers. I will say that I have no problem with CL reverting my change (especially since I was on vacation and unable to respond), so I'm not sure it's worth the drama above. However, I do disagree with the assertion that we don't have to provide support for the second parameter in Module:URL. The second parameter in {{URL}} is deprecated, but its use in the module is required for {{Official website}} to function (and the existence of {{Official website}} is often cited as one of the reasons that the parameter in {{URL}} was deprecated in the first place). --Ahecht (TALK
) 02:32, 4 July 2017 (UTC)
@Ahecht: To be fair, CL said second parameter of {{URL}}, not the second parameter of the module or anything like that. In other words, there is no such assertion that we don't have to provide support for the second parameter in Module:URL. FleetCommand (Speak your mind!) 04:08, 4 July 2017 (UTC)

Template should be prefered from urls[edit]

We should add somewhere that this template should be prefered from its url in brackets eqquvalent because it compares its values with Wikidata and it content can also eventually be replaced by Wikidata to avoid link rot. -- Magioladitis (talk) 22:28, 30 June 2017 (UTC)

How do you envision Wikidata will solve link rot? -- GreenC 03:17, 1 July 2017 (UTC)
GreenC Wikidata address to a larget audience because is not language-restricted. Any change in any Wikipedia language project will be visible immediatelly to all projects. -- Magioladitis (talk) 05:59, 1 July 2017 (UTC)
Ok I thought you meant wp:link rot which is a dead links replaced by an archive links. Currently that is done in the wikitext by bot, or by History-tab -> Fix-Dead-Links. -- GreenC 12:57, 1 July 2017 (UTC)
...and can be done in Wikidata by a bot, too. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:31, 10 July 2017 (UTC)
+1 this is very sensible. c/f {{Authority control}}. Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 15:36, 10 July 2017 (UTC)

Add "Edit in Wikidata" link[edit]

How could we add an "Edt in Wikidata" link to this template similar to the ones that appeared in other templates? -- Magioladitis (talk) 16:31, 16 July 2017 (UTC)