Modify

Opened 5 years ago

Closed 5 years ago

#18251 closed enhancement (fixed)

Add validator auto-fix to replace URL-encoded characters and underscores in wikipedia:lang=* tags

Reported by: pyrog Owned by: team
Priority: normal Milestone: 19.10
Component: Core validator Version:
Keywords: template_report wikipedia Cc: nyurik, floscher, simon04

Description

What steps will reproduce the problem?

  1. load node 2522239874
  2. clean tag wikipedia:fr=https://fr.wikipedia.org/wiki/Path%C3%A9_Palace_(Bruxelles)
  3. wikipedia:fr=Path%C3%A9_Palace_(Bruxelles)
  4. upload data

What is the expected result?

Error message that explain that %XX characters are not allowed.
Display the "repair" button

What happens instead?

Strange error message

Please provide any additional information below. Attach a screenshot if possible.

URL:https://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2019-10-22 23:54:14 +0200 (Tue, 22 Oct 2019)
Build-Date:2019-10-23 01:30:56
Revision:15470
Relative:URL: ^/trunk

Identification: JOSM/1.5 (15470 fr) Mac OS X 10.14.6
OS Build number: Mac OS X 10.14.6 (18G95)
Memory Usage: 393 MB / 1820 MB (87 MB allocated, but free)
Java version: 1.8.0_221-b11, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: Display 69732928 1280x800
Maximum Screen Size: 1280x800
VM arguments: [-Djava.security.policy=file:<java.home>/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=/Applications/josm-latest.jnlp, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=NULL,2048m, -Dmacosx.jnlpx.dock.name=JOSM (development version), -Dmacosx.jnlpx.dock.icon=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/25/4c122699-72a21903.icns, -Djnlpx.jvm="<java.home>/bin/java"]
Dataset consistency test: No problems found

Plugins:
+ CADTools (1008)
+ PicLayer (35104)
+ SeaMapEditor (34908)
+ apache-commons (35092)
+ apache-http (34908)
+ cadastre-fr (35194)
+ ejml (35122)
+ geotools (35169)
+ jaxb (35014)
+ jna (34908)
+ jts (35122)
+ opendata (35179)
+ reverter (35084)
+ tag2link (35149)
+ utilsplugin2 (35177)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/Towers&zip=1
+ https://raw.githubusercontent.com/OpenNauticalChart/josm/master/INT-1-preset.xml
+ https://josm.openstreetmap.de/josmfile?page=Presets/Telecom&zip=1

Validator rules:
+ https://github.com/Jungle-Bus/transport_mapcss/raw/gh-pages/transport.validator.zip

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.
- E: java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/PILPNT_PT.shp (No such file or directory). Cause : java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/PILPNT_PT.shp (No such file or directory)
- E: org.openstreetmap.josm.io.IllegalDataException: java.io.IOException: java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/PILPNT_PT.shp (No such file or directory). Cause : java.io.IOException: java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/PILPNT_PT.shp (No such file or directory). Cause : java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/PILPNT_PT.shp (No such file or directory). Cause : java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/PILPNT_PT.shp (No such file or directory)
- E: java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/SILTNK_PT.shp (No such file or directory). Cause : java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/SILTNK_PT.shp (No such file or directory)
- E: org.openstreetmap.josm.io.IllegalDataException: java.io.IOException: java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/SILTNK_PT.shp (No such file or directory). Cause : java.io.IOException: java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/SILTNK_PT.shp (No such file or directory). Cause : java.lang.RuntimeException: java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/SILTNK_PT.shp (No such file or directory). Cause : java.io.FileNotFoundException: ${HOME}${HOME}/Downloads/BALISAGE/DATA/SHAPE/SILTNK_PT.shp (No such file or directory)
- E: Handled by bug report queue: java.lang.NullPointerException
- E: Handled by bug report queue: java.lang.NullPointerException
- W: couldn't parse wizard input
- E: org.openstreetmap.josm.tools.UncheckedParseException

Attachments (0)

Change History (7)

comment:1 by Klumbumbus, 5 years ago

Component: CoreCore validator

The rule was added in #14425. To be honest I can't say if that rule makes sense or not.

/* Wikipedia without wikidata */
*[!wikipedia][/^wikipedia:/] {
  throwWarning: tr("wikipedia tag is not set, but a ''{0}'' tag is. Make sure to use wikipedia=language:value together with wikidata tag.", "{1.key}");
  assertMatch: "node wikipedia:en=a";
  assertNoMatch: "node wikipedia=a wikipedia:en=b";
  assertNoMatch: "node wikipedia=Foo";
}

comment:2 by Klumbumbus, 5 years ago

Cc: nyurik added

comment:3 by Don-vip, 5 years ago

Cc: floscher simon04 added
Keywords: wikipedia added

Florian, Simon, what do you think?

comment:4 by floscher, 5 years ago

What is the "strange error message"?

From Klumbumbus' answer I assume it is

wikipedia tag is not set, but a 'wikipedia:fr' tag is. Make sure to use wikipedia=language:value together with wikidata tag.

Which is a correct error message. The wikipedia:lang=* tags should be only used to reference more articles in addition to the main article in wikipedia=*.

I would reword it to make it clearer:

wikipedia tag is not set, but a 'wikipedia:fr' tag is. Make sure to set 'wikipedia=language:value for the main article and 'wikipedia:language=value' only for additional articles that are not just other language variants of the main article.

I think the proposed new rule to remove URL-encoded parts (and by the way underscores as well) is a good suggestion, but I don't know if this would be something for core or rather for the Wikipedia plugin.

comment:5 by floscher, 5 years ago

Summary: wikipedia value validation : strange error messageAdd validator auto-fix to replace URL-encoded characters and underscores in wikipedia:lang=* tags

So this ticket is basically about removing URL-encoded characters and underscores from wikipedia:lang=* tags, like it's already done for wikipedia=* tags.

comment:6 by Klumbumbus, 5 years ago

Milestone: 19.10
Type: defectenhancement

comment:7 by Klumbumbus, 5 years ago

Resolution: fixed
Status: newclosed

In 15473/josm:

  • fix #18251 - warn about wikipedia:lang tags with URL encoded values, no autofix as the syntax is not yet supported; reword an other validator warning
  • ignore traffic_calming=dynamic_bump, approved proposal but very few uses so far

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.