Modify

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#18256 closed enhancement (wontfix)

Validator display a wrong message for wikipedia=de.wikipedia.org/wiki/Fünfknopfturm_und_Unteres_Tor

Reported by: pyrog Owned by: team
Priority: minor Milestone:
Component: Core validator Version:
Keywords: template_report Cc:

Description

What steps will reproduce the problem?

wikipedia=de.wikipedia.org/wiki/Fünfknopfturm_und_Unteres_Tor.

What is the expected result?

Tell that this format is deprecated ?
Display a repair button

What happens instead?

Get message "wikipedia tag has no language given, use wikipedia=language:page title"

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

Check "(.*)\.wikipedia.org\/wiki\/(.*)"
replace value by "$1:$2"

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: 382 MB / 1820 MB (218 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=${HOME}/Library/Application Support/Oracle/Java/Deployment/cache/6.0/31/583aa85f-4a297e61, -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, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm-latest.jnlp , -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: Error header: Version mismatch: Provided 1, server had: 3 of Node 6716941318
- E: Conflits détectés - <html>L’envoi<strong>a échoué</strong> car le serveur possède une version plus récente<br>d’un nœud, chemin ou relation.<br>Le conflit a pour origine le <strong>nœud</strong> avec l’identifiant <strong>6 716 941 318</strong>,<br>le serveur possède la version 3, votre version est 1.<br><br>Cliquez sur <strong>Synchroniser le nœud 6 716 941 318</strong> pour synchroniser uniquement l’objet en conflit.<br>Cliquez sur <strong>Synchroniser tout le jeu de données</strong> pour synchroniser tout le jeu de données.<br>Cliquez sur <strong>Annuler</strong> pour annuler et continuer.<br></html>
- E: Handled by bug report queue: java.lang.NullPointerException

Attachments (0)

Change History (9)

comment:1 by floscher, 6 years ago

That validator message is basically telling you that you use the wrong format. Yes, it could be worded more clearly, but you get a message that tells you to use the format wikipedia=language:value instead of whatever you currently use.

The format you describe is currently used 5 times on the whole planet, so IMO doesn't warrant a special autofix: https://overpass-turbo.eu/s/NpO

Last edited 6 years ago by floscher (previous) (diff)

comment:2 by floscher, 6 years ago

Component: CoreCore validator
Priority: normalminor
Type: defectenhancement

in reply to:  1 comment:3 by Klumbumbus, 6 years ago

Resolution: wontfix
Status: newclosed

Replying to floscher:

The format you describe is currently used 5 times on the whole planet, so IMO doesn't warrant a special autofix: https://overpass-turbo.eu/s/NpO

I agree.

comment:4 by pyrog, 6 years ago

The format you describe is currently used 5 times on the whole planet, so IMO doesn't warrant a special autofix:

I cleaned hundreds of wikipedia/wikidata before you checked taginfo. That is why you don't get anything ;-)

If I'am not wrong, there is no taginfo history.
So the only way is to check all me changesets from #76107779 to #76126525

BR,

Yves

comment:5 by floscher, 6 years ago

Indeed, on October 16th there were 318 tags with that format: https://overpass-turbo.eu/s/NsP

comment:6 by floscher, 5 years ago

You could try the new version 1.1.3 of the wikipedia plugin. I added a validator check that replaces such URLs in wikipedia=* tags with an auto-fix.

comment:7 by pyrog, 5 years ago

@floscher : Thanks, it repair fine :-)

Question :
For wikipedia=https://fr.m.wikipedia.org/wiki/Puiseux-le-Hauberger it raise 2 errors

  1. [Wiki] The value of a wikipedia tag should be given as ‹language›:‹Article lemma› instead of the full URL - Change wikipedia=https://fr.m.wikipedia.org/wiki/Puiseux-le-Hauberger to wikipedia=fr:Puiseux-le-Hauberger (1)
  2. [Wiki] Unknown Wikipedia language prefix 'https'! (1)

Could the rules be encapsulated ? I mean if rule 1 detect an error, don't check inner rules i.e. 2 in this case.

comment:8 by pyrog, 5 years ago

@floscher

It doesn't display the same error for wikipedia=en:https://en.m.wikipedia.org/wiki/Kotli,_Himachal_Pradesh
https://www.openstreetmap.org/node/6942530377

It display [Wiki] Unknown Wikipedia language prefix 'https''' for wikipedia=https://en.wikipedia.org/w/index.php?title=Swansea_Crown_Court&redirect=no
https://www.openstreetmap.org/way/459202591

Similar message for http prefix.

Don't detect wikipedia=gl:https://upload.wikimedia.org/wikipedia/commons/6/6a/Plano_de_Moaña.png
https://www.openstreetmap.org/node/6703264890

Don't warn for wikipedia=fr:Musée de Tessé?oldformat=true

Don't raise an error for wikipedia:en=Alcazaba of Almer%C3%ADa

Last edited 5 years ago by pyrog (previous) (diff)

in reply to:  8 comment:9 by floscher, 5 years ago

Replying to pyrog:

@floscher : Thanks, it repair fine :-)

Question :
For wikipedia=https://fr.m.wikipedia.org/wiki/Puiseux-le-Hauberger it raise 2 errors

  1. [Wiki] The value of a wikipedia tag should be given as ‹language›:‹Article lemma› instead of the full URL - Change wikipedia=https://fr.m.wikipedia.org/wiki/Puiseux-le-Hauberger to wikipedia=fr:Puiseux-le-Hauberger (1)
  2. [Wiki] Unknown Wikipedia language prefix 'https'! (1)

Could the rules be encapsulated ? I mean if rule 1 detect an error, don't check inner rules i.e. 2 in this case.

Sure, the "unknown Wikipedia language prefix" error will in v1.1.4 only be displayed, if the other other error is not present.

Replying to pyrog:

@floscher

It doesn't display the same error for wikipedia=en:https://en.m.wikipedia.org/wiki/Kotli,_Himachal_Pradesh
https://www.openstreetmap.org/node/6942530377

I added a better warning for when the tag contains a URL but is not quite a URL. But I'd rather not add an autofix, these should be handled manually, since there could be

  • contradicting cases, like wikipedia=fr:https://en.m.wikipedia.org/wiki/Kotli,_Himachal_Pradesh
  • information in the part that does not belong to the URL that would then be lost (e.g. wikipedia=architect of the building was https://en.wikipedia.org/wiki/John_Doe)


It display [Wiki] Unknown Wikipedia language prefix 'https''' for wikipedia=https://en.wikipedia.org/w/index.php?title=Swansea_Crown_Court&redirect=no
https://www.openstreetmap.org/way/459202591

This will be fixed in v1.1.4 with an autofix that replaces with wikipedia=en:Swansea Crown Court. But in this particular case the tag should be removed entirely, that article redirects to a Wikipedia list.

Similar message for http prefix.

Don't detect wikipedia=gl:https://upload.wikimedia.org/wikipedia/commons/6/6a/Plano_de_Moaña.png
https://www.openstreetmap.org/node/6703264890

This will also get the same warning as Kotli, Himachal Pradesh above, I don't see a way to autofix this.

Don't warn for wikipedia=fr:Musée de Tessé?oldformat=true

What would be the criteria for this? Values that contain a question mark (are there real articles containing question marks?)? Ones that contain a question mark, but not as last character? Ones that contain oldformat=true (other parameters too?)?

Don't raise an error for wikipedia:en=Alcazaba of Almer%C3%ADa

Ah yes, I thought JOSM core warns about this, so I excluded it from the check for URL-encoded characters. But since JOSM core does not provide an autofix, I'll include this in v1.1.4.

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.