Template talk:Infobox road
| Template:Infobox road is indefinitely protected from editing as it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
| If you set up a country to use this template, be sure to add it to this page. |
| There is 1 infobox transclusion with errors. |
This template was nominated for deletion. Please review the prior discussions if you are considering re-nomination:
|
| This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||
| |||||||||||||||
Road maps seem broken
[edit]To whom it may concern, the maps in the infoboxes of roads such as A308 road, A3055 road etc. all seem broken, possibly pointing to coordinates 0,0 in the Atlantic. ITookSomePhotos (talk) 20:25, 6 November 2025 (UTC)
- @ITookSomePhotos: Ah, the null island problem. It's normally transient. Try again later. --Redrose64 🌹 (talk) 21:18, 6 November 2025 (UTC)
This should display A308 road, but it displays Null Island- The problem is also visible in the map on the right, which is using the same markup as generated by the infobox on A308 road. I think it's supposed to fetch and display coordinates from d:Q4649119, but it doesn't. @Redrose64 I haven't seen this before, do you know why or when it happens? Matma Rex talk 14:17, 7 November 2025 (UTC)
- I'm not an expert, I don't even like mapframe - I much prefer our pushpin maps that we used happily for years. I'm just the poor schmuck who keeps noticing complaints like the one above and who also happens to have Template talk:Infobox UK place#Mapframe on my watchlist. --Redrose64 🌹 (talk) 14:35, 7 November 2025 (UTC)
- The problem is with this line:
| mapframe-point = none
- at Template:Infobox road. I remove that at Template:Infobox road/sandbox and the problem resoved. So please apply the sandbox. Thanks, Hooman Mallahzadeh (talk) 15:35, 7 November 2025 (UTC)
- I corrected OnByDefault problem with this edit. So please apply sandbox. Hooman Mallahzadeh (talk) 16:02, 7 November 2025 (UTC)
- I've reverted this part, thanks. In parallel we were just talking about that mapframe-point thing at Template talk:Infobox mapframe, it's not a safe default in an infobox. --Joy (talk) 08:11, 8 November 2025 (UTC)
- I'm not an expert, I don't even like mapframe - I much prefer our pushpin maps that we used happily for years. I'm just the poor schmuck who keeps noticing complaints like the one above and who also happens to have Template talk:Infobox UK place#Mapframe on my watchlist. --Redrose64 🌹 (talk) 14:35, 7 November 2025 (UTC)
Problematic statement
[edit]In articles like A308 road and A3055 road that their Wikidata item don't have P15, these statements return "true":
{{#if:{{wikidata|property|P15}}|no|yes}}or
{{#if:{{#property:P15|from={{{qid|}}}}}|no|yes}}But I don't know why? Please note that the length of Wikidata string for P15 is zero by this statement:
{{#invoke:String|len|{{#property:P15|from={{{qid|}}}}}}}Please inspect, Thanks, Hooman Mallahzadeh (talk) 05:43, 8 November 2025 (UTC)
- @Joy Hi, What is your idea? I think the above problem is really critical and should be resolved as soon as possible because many Wikipedia articles have the same issue. I propose to create a new phabricator task with very high priority regarding "if statement" and "Wikidata return vlaue". I can't understand why this "if" returns "true"? Hooman Mallahzadeh (talk) 08:01, 8 November 2025 (UTC)
- Can we move this part to Template talk:Infobox road please? It seems far more intricate than the other bugfix, this probably warrants further investigation. --Joy (talk) 08:12, 8 November 2025 (UTC)
- Ok, I tested that in A308 road article
{{#if:{{wikidata|property|P16}}|no|yes}}- returns "no" but
{{#if:{{wikidata|property|P15}}|no|yes}}- returns "true". So this issue is relevant to Template:Infobox road. You are right! Please move it. Thanks for your response. Hooman Mallahzadeh (talk) 08:19, 8 November 2025 (UTC)
moved at request of Joy and Hooman Mallahzadeh. Please continue below. --Redrose64 🌹 (talk) 09:33, 8 November 2025 (UTC)- Hmm, so you're saying a lookup of d:Property:P16 which is "transport network" works apparently fine (it fails as it should), but a lookup of our d:Property:P15 which is "route map" is succeeding even when d:Q4649119 shows no such route map property?
- The check that I had used was this: {{#property:P15|from={{{qid|}}}}} which we can render here:
-><-
- That seems fine - it fails, as it should.
- Let's test it within #if ({{#if:{{#property:P15|from=Q4649119}}|if says true|if says false}}):
->if says false<-
- Can you clarify what you mean more exactly, then? --Joy (talk) 13:33, 8 November 2025 (UTC)
- The problem is with this line at Template:Infobox road surprisingly returns "true":
| onByDefault = {{#if:{{{map|}}}{{{map_custom|}}}{{#property:P15|from={{{qid|}}}}}|no|yes}}- Even though the output of {{#property:P15|from={{{qid|}}}}} when is inserted at article A308 road is "null", the surprising event is that if statement returns "true", i.e. "if null" returns "true". I don't know why?
- Please add this lines to the first of article A308 road to test the issue.
AA{{#property:P15|from={{{qid|}}}}}BB{{#if:{{wikidata|property|P15}}|no|yes}}- Thanks again, Hooman Mallahzadeh (talk) 14:50, 8 November 2025 (UTC)
- I'm not sure what you mean. I tried these two:
- AA{{#property:P15}}BB{{#if:{{wikidata|property|P15}}|check is true|check is false}}CC
- AA{{#property:P15|from=Q4649119}}BB{{#if:{{wikidata|property|P15|Q4649119}}|check is true|check is false}}CC
- And then the preview of both of those returned:
- AABBcheck is falseCC
- Which seems to be accurate.
- The meaning of the onDefault check is to see if there's any other map available. On that article, there is no map parameter to the infobox, no map_custom, and the Wikidata entry doesn't have P15. So with nothing there, it tells mapframe to go on by default - to give it a shot.
- Infobox mapframe in turn checks for coordinates, WD P625 (coordinate location), P402 (OSM relation ID), etc, and renders whatever it can find.
- In this case, right now it finds P625, and renders that. (This part used to be broken yesterday.)
- It's not great, but it's better than nothing. --Joy (talk) 15:22, 8 November 2025 (UTC)
- You are right! That was my mistake. Sorry. :) But showing point for roads does not seem reasonable, better than nothing.Hooman Mallahzadeh (talk) 15:34, 8 November 2025 (UTC)
- Can we move this part to Template talk:Infobox road please? It seems far more intricate than the other bugfix, this probably warrants further investigation. --Joy (talk) 08:12, 8 November 2025 (UTC)
Discussion of default rendering of shapes/lines in Template:Infobox mapframe
[edit]We're discussing how to handle the rendering of shapes/lines in Template:Infobox mapframe, given that OSM data is unreliable. This will likely affect this template. You're welcome to join in the discussion. — hike395 (talk) 09:49, 8 November 2025 (UTC)
"Route map: "
[edit]Why do articles like M25 motorway or Interstate 275 (Michigan) have (in desktop view) at the top right the text "Route map:" and then a blank line before the infobox starts? Seems to add no value at all. At California State Route 1 the hatnote text even comes between the "route map" and the infobox. Are there articles where it actually serves a purpose? Fram (talk) 11:46, 8 December 2025 (UTC)
- I don't see any such blank line (logged out, Brave browser on Mac OS). Feel free to upload a screen shot from a logged-out browser on your computer. In any event, I don't think this infobox is causing the Route map wording and globe with pop-down map to appear. In California State Route 1, it is still there if I remove the infobox in Preview. I believe that it is generated by {{Attached KML/California State Route 1}}, which is called from {{Attached KML}} in the footer. The talk page for that template would be a good place to address your concerns. – Jonesey95 (talk) 20:21, 9 December 2025 (UTC)
- You're right, it is caused by the Attached KML template, not by the infobox! Fram (talk) 16:34, 10 December 2025 (UTC)
Edit request
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please add a separate category for tracking shield errors for Template:Infobox road/shieldmain.--~2025-43018-05 (talk) 03:54, 29 December 2025 (UTC)
- @~2025-43018-05: First, there is no such page as Template:Infobox road/shieldmain. Second, you don't state what constitutes a "shield error". Third, I don't see that there has been any discussion on the need to add such a category. Therefore,
Not done for now: please establish a consensus for this alteration before creating an edit request. --Redrose64 🦌 (talk) 13:24, 29 December 2025 (UTC)
Edit request 25 January 2026
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Please add .header-ATG to line 92 (after .header-MUTCDgreen, .header-AGO, .header-ANG, .header-ARE, .header-ARG, on Template:Infobox road/styles.css. — Preceding unsigned comment added by CROIX (talk • contribs) 20:56, 25 January 2026 (UTC)
Edit request 19 February 2026
[edit]This edit request has been answered. Set the |answered= parameter to no to reactivate your request. |
Description of suggested change: The list of national roads was recently moved to a dedicated article in National roads in Greece. Therefore, line 268 should be modified to reflect the location of the article. For the test cases, see Module talk:Infobox road/browselinks/testcases.
Diff:
| − | return "*'''Highways in Greece'''\n\n*[[Motorways in Greece|Motorways]]\n*[[National | + | return "*'''Highways in Greece'''\n\n*[[Motorways in Greece|Motorways]]\n*[[National roads in Greece|National roads]]" |
Best, --Minoa (talk) 10:05, 19 February 2026 (UTC)