Module talk:DescriptionFromDataItem

From OpenStreetMap Wiki
Jump to navigation Jump to search

Closed ways

Why add an icon for onClosedWay? It was disfavoured at Template talk:ValueDescription#Closed_way_icon.--Andrew (talk) 17:24, 30 December 2018 (UTC)

Andrew, where do you see an icon on closed way? The only check for it is to create a Category:Obsolete description template parameters -- so that it can be removed (I might remove it using a bot if everyone is ok with it). --19:19, 30 December 2018 (UTC)
That is fine.--Andrew (talk) 20:30, 30 December 2018 (UTC)

P11 (Proposal discussion) -> statuslink not working

Resolved: Not a bug, but a human error. :) --SelfishSeahorse (talk) 06:38, 10 April 2019 (UTC)

The adoption of proposal discussion (P11) for statuslink in {{KeyDescription}} and {{ValueDescription}} does not work. --SelfishSeahorse (talk) 20:07, 9 April 2019 (UTC)

@SelfishSeahorse please be a bit more specific. The Pl:Key:bridge:movable shows a link to the proposal discussion, without it being listed. I saw you were experimenting with shop=fashion_accessories (Q19528), i will see if it works correctly. --Yurik (talk) 20:53, 9 April 2019 (UTC)
@SelfishSeahorse, fixed -- you used proposal discussion (P11) as a qualifier, but per data item docs, it should be used as a "reference" (e.g. proving that status is set correctly). I fixed it for you. Note that "add reference" only shows up in the status property. --Yurik (talk) 21:03, 9 April 2019 (UTC)
@Yurik: Thank you for your help! --SelfishSeahorse (talk) 06:38, 10 April 2019 (UTC)

Linked tags break mismatch tooltip

@Yurik If the wiki page and data item have differing descriptions, the module inserts a <span> with a tooltip containing the desc_mismatch message and the data item's formatted description. This formatted description needs to be sanitized; otherwise, links added during formatting can break the HTML tag, as seen on change=*. – Minh Nguyễn 💬 18:18, 19 April 2019 (UTC)

@Minh Nguyen thx for the report. This one is a bit nasty -- template expansion "key:xxx" -> {{Key|xxx}} happens at the very last moment, right before passing the "description" parameter to the {{Description}} template. But the <span> gets added before that, which means the string "<span title="... key:xxx ..."> ... </span>" is expanded with templates at the last moment, thus breaking the key:xxx thing. One simple solution would be to not expand the keys/tags if the description is different, but it's not ideal. --Yurik (talk) 03:46, 21 April 2019 (UTC)
P.S. resolved with the above fix, still a todo for the future cleanup. --Yurik (talk) 03:55, 21 April 2019 (UTC)

Lua error: multiple tags in combination (?)

@Yurik Based on my edits at DE:Key:restaurant and Item:Q646, I guess there is an error with {{KeyDescription}} when there are multiple tags/keys using property P46. Is that correct? --Tigerfell This user is member of the wiki team of OSM (Let's talk) 18:25, 11 August 2019 (UTC)

@Tigerfell thanks, I fixed the code -- it never should have crashed, even on bad data. It now shows "bad item" for cases like that. I didn't want to hide it because then it would be much harder to notice and to fix. The reason - the value in combinations is not a key or a tag. --Yurik (talk) 16:05, 15 August 2019 (UTC)

Thanks, I would have never figured out that error. --Tigerfell This user is member of the wiki team of OSM (Let's talk) 20:18, 15 August 2019 (UTC)

ValueDescription adding nonexisting category

See - seems to be caused by this module Mateusz Konieczny (talk) 11:14, 18 October 2019 (UTC)