Modify

Opened 2 months ago

Closed 8 weeks ago

#16495 closed defect (fixed)

MapCss Validation lost tag on misconstructed fixAdd

Reported by: frodrigo Owned by: team
Priority: normal Milestone: 18.07
Component: Core validator Version:
Keywords: template_report Cc: nyurik, bastiK

Description (last modified by Don-vip)

What steps will reproduce the problem?

  1. Download object relation 8448338 (or any object with a tag wikipedia=NL:foo_bar
  2. Active the Wikipedia ruleset validator
  3. Validate
  4. Select the validation Warning about: Wikipedia page title should have spaces instead of underscores (_ )
  5. Choose the fix button

What is the expected result?

The wikipedia tag should be now wikipedia=NL:foo bar

What happens instead?

The wikipedia tag disappear.
Because of two issues:

  1. The validation rule is case insensitive
      node[wikipedia =~ /(?i)^[-a-z]{2,12}:.*_/][wikipedia !~ /(?i)^[-a-z]{2,12}:https?:/] {                                              
    

But the replacement is not

  fixAdd: concat("wikipedia=", get(regexp_match("^([-a-z]+:)(.+)$", tag("wikipedia")),1), trim(replace(get(regexp_match("^([-a-z]+:)(.+)$", tag("wikipedia")),2), "_", " ")));                                                                 

So the regexp_match match nothing, the two regexp_match should be fixed with "/(?i)..."

  1. JOSM simple lost the wikipedia tag

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: 2018-03-30 21:58:50 +0200 (Fri, 30 Mar 2018)
Build-Date:2018-03-31 01:32:18
Revision:13590
Redirecting:to URL 'https://josm.openstreetmap.de/svn/trunk':
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13590 fr) Linux Arch Linux
Memory Usage: 809 MB / 1749 MB (578 MB allocated, but free)
Java version: 1.8.0_172-b11, Oracle Corporation, OpenJDK 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-Djosm.restart=true]
Dataset consistency test: No problems found

Plugins:
+ Mapillary (v1.5.12+pre13643)
+ OpeningHoursEditor (34095)
+ PicLayer (34170)
+ apache-commons (34109)
+ apache-http (34109)
+ buildings_tools (34109)
+ conflation (0.5.9)
+ contourmerge (1032)
+ ejml (34126)
+ epci-fr (34095)
+ geotools (34125)
+ jts (34038)
+ log4j (34038)
+ pbf (34109)
+ poly (34098)
+ reverter (34109)
+ tag2link (34109)
+ tageditor (34109)
+ turnlanes (34146)
+ turnlanes-tagging (263)
+ undelete (34109)
+ utilsplugin2 (34263)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/LaneAttributes&zip=1

Map paint styles:
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://github.com/hotosm/HDM-JOSM-style/archive/master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_features_ryg&zip=1

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

Last errors/warnings:
- W: No configuration settings found.  Using hardcoded default values for all pools.

Attachments (0)

Change History (6)

comment:1 Changed 2 months ago by frodrigo

Description: modified (diff)

comment:2 Changed 2 months ago by frodrigo

Other Wikipedia rules have the same issue in the fix.

Last edited 2 months ago by frodrigo (previous) (diff)

comment:3 Changed 2 months ago by frodrigo

I fixed the original relation, because the erroneous MapCSS rule also raise errors in Osmose-QA code generated from JOSM MapCSS rules.
https://www.openstreetmap.org/changeset/60812872

comment:4 Changed 2 months ago by Don-vip

Component: CoreCore validator
Description: modified (diff)
Milestone: 18.07

comment:5 Changed 2 months ago by Klumbumbus

Cc: nyurik bastiK added

#14425 seems related

comment:6 Changed 8 weeks ago by Don-vip

Resolution: fixed
Status: newclosed

In 14057/josm:

fix #16495 - make wikipedia validation rules case insensitive

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.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.