Modify

Opened 3 years ago

Last modified 3 years ago

#20710 new defect

Problems with wikipedia plugin in case of a redirection.

Reported by: mdk Owned by: floscher
Priority: normal Milestone:
Component: Plugin wikipedia Version:
Keywords: template_report Cc:

Description (last modified by skyper)

What steps will reproduce the problem?

  1. open attached castell.osm
  2. Validate
  3. Two warnings appear

What is the expected result?

An easy way to fix the warnings.

What happens instead?

Strange operations when I try to fix the first warning, which didn't solve the problem.

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

When I validate the relation 3876182 ("Römerkastell Irgenhausen") I get two warnings:

[Wiki] Wikidata item and Wikipedia article do not match! - Wikidata item Q241013 is not associated with Wikipedia article de:Kastell Irgenhausen (has no Q-ID) (1)
[Wiki] Wikipedia article is a redirect - Wikipedia article 'Kastell Irgenhausen' redirects to 'Kleinkastell Irgenhausen' (1)

I tried to fix the first warning with the wikidata plugin (I didn't see, that the root of the problem was the second warning):
First I try Fetch Wikidata IDs (I have a valid wikipedia key), but nothing happens except of a new command on the stack:

Sequence: Add Wikidata for language 'de'
    Set 1 tags for 0 objects

Which means, "I have done nothing". BTW: Why adding a "nop" command to the stack?

Second try is Search Wikidata items. When I enter "Irgenhausen", I get 3 results and the last sounds promissing:

Irgenhausen, römisches Kastell Q29932996 (archäologische Stätte in der Schweiz)

This one has a different Wikidata ID, so select it (double click or "Add Tag"). Now an "Overwrite key" Dialog pops up asking me to override Q241013 with Q29932996:

After pressing "Yes" a second "Overwrite key" Dialog pop up asking me to override Q29932996 with Q241013:

If I reject the second "revert" action and validate again I get now:
[Wiki] Wikidata item and Wikipedia article do not match! - Wikidata item Q29932996 is not associated with Wikipedia article de:Kastell Irgenhausen (has no Q-ID) (1)

This is quite confusing!

When I first fix the second warning (redirection) with the offered hot fix, these changes are done:

- wikipedia=de:Kastell Irgenhausen
+ wikipedia=de:Kleinkastell Irgenhausen

Now both wikidata IDs Q241013 "castra of Irgenhausen" and Q29932996 "Irgenhausen, römisches Kastell" are valid.

Could the validator suppress the first warning in case of a redirect (second warning)? Maybe a better warning in case of a redirect? Even changing the order of the two warnings could help.

BTW: Is there a possibility to copy a command stack entry? When I try this, I get:

javax.swing.JLabel[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=8388608,maximumSize=,minimumSize=,preferredSize=,defaultIcon=javax.swing.ImageIcon@72a7a3f8,disabledIcon=,horizontalAlignment=CENTER,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Sequence: Add Wikidata for language 'de',verticalAlignment=CENTER,verticalTextPosition=CENTER]
javax.swing.JLabel[,0,0,0x0,invalid,alignmentX=0.0,alignmentY=0.0,border=,flags=8388608,maximumSize=,minimumSize=,preferredSize=,defaultIcon=javax.swing.ImageIcon@30ad9faf,disabledIcon=,horizontalAlignment=CENTER,horizontalTextPosition=TRAILING,iconTextGap=4,labelFor=,text=Set 1 tags for 0 objects,verticalAlignment=CENTER,verticalTextPosition=CENTER]

but I would expect just getting the "text" instead of the whole swing object.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2021-04-01 23:17:01 +0200 (Thu, 01 Apr 2021)
Revision:17702
Build-Date:2021-04-01 21:46:03
URL:https://josm.openstreetmap.de/svn/trunk

Identification: JOSM/1.5 (17702 en) Linux Ubuntu 20.10
Memory Usage: 1980 MB / 1980 MB (697 MB allocated, but free)
Java version: 15+36-Ubuntu-1, Private Build, OpenJDK 64-Bit Server VM
Look and Feel: javax.swing.plaf.metal.MetalLookAndFeel
Screen: :0.0 3840×2160 (scaling 2.00×2.00)
Maximum Screen Size: 3840×2160
Best cursor sizes: 16×16→16×16, 32×32→32×32
Environment variable LANG: de_CH.UTF-8
System property file.encoding: UTF-8
System property sun.jnu.encoding: UTF-8
Desktop environment: ubuntu:GNOME
Java ATK Wrapper package: libatk-wrapper-java:all-0.38.0-1
libcommons-compress-java: libcommons-compress-java:all-1.20-1
libcommons-logging-java: libcommons-logging-java:all-1.2-2
fonts-noto: fonts-noto:all-20200323-1build1
VM arguments: [--add-modules=java.scripting,java.sql, -Djosm.restart=true, -Djosm.dir.name=JOSM-latest, -Djava.net.useSystemProxies=true]
Dataset consistency test: No problems found

Plugins:
+ FastDraw (35640)
+ HouseNumberTaggingTool (35640)
+ OpeningHoursEditor (35640)
+ RoadSigns (35640)
+ SimplifyArea (35640)
+ buildings_tools (35669)
+ contourmerge (v0.1.6)
+ imagery-xml-bounds (35723)
+ imagery_offset_db (35640)
+ pbf (35720)
+ poly (35640)
+ public_transport (35640)
+ reltoolbox (35640)
+ reverter (35688)
+ terracer (35640)
+ turnrestrictions (35640)
+ utilsplugin2 (35691)
+ wikipedia (1.1.4)

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

Map paint styles:
+ https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&style&zip=1

Last errors/warnings:
- 02543.429 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=%1FQ10299520%1FQ1103%1FQ1115063%1FQ11983535%1FQ12869285%1FQ12975794%1FQ1341545%1FQ13426605%1FQ1473366%1FQ16692773%1FQ18208944%1FQ193796%1FQ1943651%1FQ19803506%1FQ199%1FQ206166%1FQ23108%1FQ25096132%1FQ27165969%1FQ27273%1FQ28469711%1FQ28530017%1FQ28595%1FQ2901600%1FQ29710245%1FQ29711518%1FQ29715277%1FQ29715665%1FQ29716783%1FQ29717328%1FQ29809643%1FQ29996%1FQ3147025%1FQ3275031%1FQ3330225%1FQ40462%1FQ422564%1FQ484940%1FQ49404%1FQ50278473%1FQ50379086%1FQ51929218%1FQ55614204%1FQ58506623%1FQ607728%1FQ65782094%1FQ69515242%1FQ729138%1FQ82625%1FQ9893&props=aliases%7Cdescriptions%7Clabels&utf8=1 old: null
- 02544.758 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=%1FQ29932996%1FQ365900%1FQ68269&props=aliases%7Cdescriptions%7Clabels&utf8=1 old: null
- 02591.239 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=sitematrix&format=json&formatversion=2&utf8=1 old: null
- 02751.742 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=sitematrix&format=json&formatversion=2&utf8=1 old: null
- 03842.827 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=%1FQ10299520%1FQ1103%1FQ1115063%1FQ11983535%1FQ12869285%1FQ12975794%1FQ1341545%1FQ13426605%1FQ1473366%1FQ16692773%1FQ18208944%1FQ193796%1FQ1943651%1FQ19803506%1FQ199%1FQ206166%1FQ2120%1FQ23108%1FQ25096132%1FQ27273%1FQ28469711%1FQ28530017%1FQ28595%1FQ2901600%1FQ29710245%1FQ29711518%1FQ29715277%1FQ29715665%1FQ29716783%1FQ29717328%1FQ29809643%1FQ29996%1FQ3147025%1FQ3275031%1FQ3330225%1FQ40462%1FQ422564%1FQ484940%1FQ49404%1FQ50278473%1FQ50379086%1FQ51929218%1FQ55614204%1FQ58506623%1FQ607728%1FQ65782094%1FQ69515242%1FQ729138%1FQ82625%1FQ9893&props=aliases%7Cdescriptions%7Clabels&utf8=1 old: null
- 03843.451 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=%1FQ29932996%1FQ365900%1FQ68269&props=aliases%7Cdescriptions%7Clabels&utf8=1 old: null
- 03955.037 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=%1FQ10299520%1FQ1103%1FQ1115063%1FQ11983535%1FQ12869285%1FQ12975794%1FQ1341545%1FQ13426605%1FQ1473366%1FQ16692773%1FQ18208944%1FQ193796%1FQ1943651%1FQ19803506%1FQ199%1FQ206166%1FQ23108%1FQ25096132%1FQ27165969%1FQ27273%1FQ28469711%1FQ28530017%1FQ28595%1FQ2901600%1FQ29710245%1FQ29711518%1FQ29715277%1FQ29715665%1FQ29716783%1FQ29717328%1FQ29809643%1FQ29996%1FQ3147025%1FQ3275031%1FQ3330225%1FQ40462%1FQ422564%1FQ484940%1FQ49404%1FQ50278473%1FQ50379086%1FQ51929218%1FQ55614204%1FQ58506623%1FQ607728%1FQ65782094%1FQ69515242%1FQ729138%1FQ82625%1FQ9893&props=aliases%7Cdescriptions%7Clabels&utf8=1 old: null
- 03955.775 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=wbgetentities&format=json&formatversion=2&ids=%1FQ29932996%1FQ365900%1FQ68269&props=aliases%7Cdescriptions%7Clabels&utf8=1 old: null
- 04206.493 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=sitematrix&format=json&formatversion=2&utf8=1 old: null
- 04356.569 E: Region [api_BLOCK_v2] : Failure updating element, key: https://www.wikidata.org/w/api.php?action=sitematrix&format=json&formatversion=2&utf8=1 old: null

Attachments (3)

SecondOverwriteKey.png (82.2 KB ) - added by mdk 3 years ago.
FirstOverwriteKey.png (79.1 KB ) - added by mdk 3 years ago.
castell.osm (25.5 KB ) - added by mdk 3 years ago.
The affected relation

Download all attachments as: .zip

Change History (9)

by mdk, 3 years ago

Attachment: SecondOverwriteKey.png added

by mdk, 3 years ago

Attachment: FirstOverwriteKey.png added

comment:1 by mdk, 3 years ago

Description: modified (diff)

comment:2 by mdk, 3 years ago

Description: modified (diff)

comment:3 by skyper, 3 years ago

Just attach the relation as sample file and fix the OSM data. You never know who is coming next, and likely the person will face the same problem.

by mdk, 3 years ago

Attachment: castell.osm added

The affected relation

comment:4 by mdk, 3 years ago

Description: modified (diff)

comment:5 by mdk, 3 years ago

Description: modified (diff)

comment:6 by skyper, 3 years ago

Description: modified (diff)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain floscher.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from floscher to the specified user.
Next status will be 'needinfo'. The owner will be changed from floscher to mdk.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from floscher to anonymous. Next status will be 'assigned'.

Add Comment


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