#12189 closed defect (fixed)
Automatic preference update for wiki urls not working
Reported by: | Klumbumbus | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | 15.12 |
Component: | Core | Version: | |
Keywords: | URL | Cc: | stoecker |
Description
14 months ago we switched icon handling of wiki hosted styles/presets/rules and all URL were changed to use zip. See #10581.
However now we still have users with old URLs, it seems that r8100 did not work as expected!?
See e.g. ticket:12187#comment:5. I had a missing icon for a long time too until I removed and readded the style manually.
According to ticket:12187#comment:6 it seems this problem affects also the change from http to https
Attachments (1)
Change History (19)
comment:1 by , 9 years ago
comment:4 by , 9 years ago
Milestone: | → 15.12 |
---|
comment:5 by , 9 years ago
Summary: | updating wiki urls not working → Automatic preference update for wiki urls not working |
---|
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:7 by , 9 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
Not fixed. We have 130 non-https/zip requests for >= 9120 since yesterday. I overlook something essential, but what?
comment:8 by , 9 years ago
On my system "josm.version" is never written to my preferences.xml, so this code is never executed.
I don't understand why, I'm looking to it.
comment:9 by , 9 years ago
After this change, josm.version
is being written:
-
src/org/openstreetmap/josm/data/Preferences.java
diff --git a/src/org/openstreetmap/josm/data/Preferences.java b/src/org/openstreetmap/josm/data/Preferences.java index 7c8bc64..907124d 100644
a b public void removeObsolete() { 1877 1877 // drop this block march 2016 1878 1878 // update old style JOSM server links to use zip now, see #10581, #12189 1879 1879 // actually also cache and mirror entries should be cleared 1880 if (getInteger("josm.version", Version.getInstance().getVersion()) < 9120) {1880 if (getInteger("josm.version", 0) < 9120) { 1881 1881 for (String key: new String[]{"mappaint.style.entries", "taggingpreset.entries"}) { 1882 1882 Collection<Map<String, String>> data = getListOfStructs(key, (Collection<Map<String, String>>) null); 1883 1883 if (data != null) {
by , 9 years ago
Attachment: | preferences.xml added |
---|
comment:11 by , 9 years ago
attachment:preferences.xml is a manually crafted preference file which should show the upgrading to https
and &zip=1
.
follow-up: 14 comment:13 by , 9 years ago
No. That's wrong. josm.version is not written in the body, but as argument to <preferences>. Please revert the change.
But it may be related. getInteger("josm.version") is probably incorrect to access the value? But somewhere the old value exists. Or it fails when other changes modify the file before this code is excecuted.
comment:14 by , 9 years ago
Replying to stoecker:
josm.version is not written in the body, but as argument to <preferences>.
I see no special treatment for this behaviour (neither in Java code nor preferences.xsd).
Please revert the change.
I confirm Simon's analysis: the first request to get josm.version property returns the default value because property does not exist in property file. So the default value is memorized in defaultMap. Then, when we want to store josm version, as the current version matches the default value, it is not written to the properties file. So the change is correct: we must not return the current value as default value if the property does not exist in properties file, and it must be lower than 9120, so 0 is correct.
comment:17 by , 9 years ago
It seems the "josm.version" variable was totally removed some thousand revisions ago or I remembered something wrong. At least it was an incorrect check.
comment:18 by , 9 years ago
Seems fixed. Only one IP of a SVN version in the logfile > 9216 which has no zip and that's our own JOSM server test system :-)
The code of r8100 only works if you load an older config file. If for some reason the version in the config got updated without that fix it will not be tried again.