Template talk:Official website

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

Not working[edit]

|url= and |name= don't seem to work.

cf, this example from Zec Mitchinamecus:

{{Official website|url=http://zecmazana.reseauzec.com/fr}}

Adding a name does nothing.

{{Official website|url=http://zecmazana.reseauzec.com/fr|name=Zec Mitchinamecus}}

Please fix.--Auric talk 12:29, 29 October 2016 (UTC)

It's |URL=. Capitalization matters. |name= is correct but it needs a URL to display the name on:
Zec Mitchinamecus PrimeHunter (talk) 13:52, 29 October 2016 (UTC)
Thanks. It's not mentioned in the doc that it needs to be |URL= and not |url=.--Auric talk 16:49, 29 October 2016 (UTC)

I could easily add support for |url= in addition to |URL=. Any objection? It seems unusual to require an all-caps argument. URL is grammatically correct but for template arguments typically lowercase. At CS1|2 there are hardly any args that contain caps. -- GreenC 17:35, 29 October 2016 (UTC)

Template now supports |url= in addition to |URL= -- GreenC 01:11, 1 November 2016 (UTC)

Issues with URLs containing '='[edit]

I am starting to work on cleaning up Category:Official website missing URL and I've noticed a common theme. There are a number of links that are broken because the URL contains an '='. For example:

  • {{Official website|http://www.andechs.de/index.php?id=2&L=0}} -> No URL found. Please specify a URL here or add one to Wikidata.

However if the '=' sign is wrapped in {{=}} then it works:

  • {{Official website|http://www.andechs.de/index.php?id{{=}}2&L{{=}}0}} -> Official website

I do not know enough about Modules to know if there is a possible solution to this but sure would be great to make it work with equal signs if possible. --Zackmann08 (Talk to me/What I been doing) 18:49, 7 November 2016 (UTC)

Follow up... For what it is worth, Module:ConvertDiff seems to work with equal signs... Not sure if there is some code there that can be used. --Zackmann08 (Talk to me/What I been doing) 18:51, 7 November 2016 (UTC)
See Help:Template#Usage_hints_and_workarounds first bullet. The best solution is always use named arguments eg.
{{Official website|url=http://www.andechs.de/index.php?id=2&L=0}} -> Official website
-- GreenC 20:53, 7 November 2016 (UTC)
Yes, please don't fix with {{=}}. It may confuse editors and tools looking for url's in the wikitext. It's technically possible for a module to detect strange parameter assignments like |http://www.andechs.de/index.php?id=2&L=0 which means the parameter name http://www.andechs.de/index.php?id is assigned the value 2&L=0. The module could then generate the intended url by joining name and value with "=" between, but this would leave a confusing mess in the wikitext. Just fix with |url=. A simple AWB find and replace can do it quickly in most cases. I will make an AWB run on the category. PrimeHunter (talk) 23:48, 7 November 2016 (UTC)
I have cleared the category. Some of the articles had an empty {{Official website}} with no url in the vicinity. I just commented it out in those cases. Many of them seemed unlikely to even have something which could be called an official website. PrimeHunter (talk) 01:19, 8 November 2016 (UTC)

Category:Official website missing URL overzealous[edit]

So there appears to be an issue with the way this module is adding pages to Category:Official website missing URL. Pages that have a website in WikiData do not need to supply a URL to the template (see Bertis Downs IV for example). Yet these pages are still being placed in the maintenance category. --Zackmann08 (Talk to me/What I been doing) 16:23, 23 November 2016 (UTC)

The hack for Module:Official website to 'fix' this behavior would probably not take too long, but GreenC has some stuff in there which differ from the current module (and which I'm not sure makes sense given the general move to Wikidata). --Izno (talk) 16:38, 23 November 2016 (UTC)

That was a bug in the logic and I just made a fix that should do it (it wasn't checking for all possible values of url and wikidataurl). The code in the sandbox can be overwritten, it's still in the history (right now probably not pursuing it). -- GreenC 16:49, 23 November 2016 (UTC)

Still not working (Bertis Downs IV keeps showing up in Category:Official website missing URL) not sure why. Relevant code:

local wikidataurl = fetchWikidataUrl()
if not url and not wikidataurl then
    category = 'Official website missing URL'

Taking it to sandbox to debug further. -- GreenC 17:10, 23 November 2016 (UTC)

Ah it is working, just needed to null-edit Bertis Downs IV to clear the category. -- GreenC 17:20, 23 November 2016 (UTC)
@Green Cardamom and Izno: thanks so much for getting right on this! I'm not fluent enough with Modules yet to do the edits myself. --Zackmann08 (Talk to me/What I been doing) 17:50, 23 November 2016 (UTC)
No problem, good catch. Lua as a language is designed for beginners, pretty approachable. This template is a little more complex due to Wikidata. -- GreenC 18:21, 23 November 2016 (UTC)
@Izno and Green Cardamom: looks like there is a problem again. Swami Nithyananda, Travel Weekly and Nick Ross are all being added to the category. --Zackmann08 (Talk to me/What I been doing) 21:06, 3 January 2017 (UTC)
Just checked Nick Ross and don't see that category. maybe you need to clear our cache, or maybe there is a backlog in the job queue? Andy Mabbett (Pigsonthewing); Talk to Andy; Andy's edits 21:10, 3 January 2017 (UTC)
@Pigsonthewing: yea I'm not seeing Nick Ross in the category anymore... but the other 2 still are. --Zackmann08 (Talk to me/What I been doing) 21:42, 3 January 2017 (UTC)
Null-edits did the job. -- Magioladitis (talk) 21:54, 3 January 2017 (UTC)

──────────────────────────────────────────────────────────────────────────────────────────────────── @Magioladitis: thanks. Can you help me understand... Is this an issue of the official website being on Wikidata but not showing up on the page yet? --Zackmann08 (Talk to me/What I been doing) 22:13, 3 January 2017 (UTC)