Bug report #8796

Cannot use forward slash in WMS name - deletes further info in field/form

Added by Dan Karran about 11 years ago. Updated almost 9 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:Web Services clients/WMS
Affected QGIS version:2.0.1 Regression?:No
Operating System:Mac Easy fix?:No
Pull Request or Patch supplied:No Resolution:
Crashes QGIS or corrupts data:No Copied to github as #:17497

Description

If you use a forward slash in the name when adding a WMS or WFS service, the forward slash and everything after it in the same field does not get saved. Also, text from the following fields (e.g. URL) are not saved.

It seems to work as expected with other non alphanumeric characters.

Screen_Shot_2013-10-09_at_12.40.27.png - Screen during input (182 KB) Dan Karran, 2013-10-09 04:42 AM

Screen_Shot_2013-10-09_at_12.40.42.png - Screen after saving and pressing edit button (189 KB) Dan Karran, 2013-10-09 04:42 AM

History

#1 Updated by Jukka Rahkonen about 11 years ago

Don't try to use forward slash in WMS layer name because it is not allowed there. That's because layer name is of XML type NCName in the schema. For the same reason WMS layer name must not begin with a number.

Read for example

http://stackoverflow.com/questions/1631396/what-is-an-xsncname-type-and-when-should-it-be-used

This should be included in WMS FAQ:

" Practical restrictions of an NCName

The practical restrictions of NCName are that it cannot contain several symbol characters like :, @, $, , x%x, /, +, ,, ;, whitespace characters or different parenthesis. Furthermore an NCName cannot begin with a number, dot or minus character although they can appear later in an NCName. "

#2 Updated by Dan Karran about 11 years ago

I hear what you're saying with regards to the layer name published by the WMS service itself, but surely a descriptive name used in QGIS for the server (not the layer) shouldn't have these same limitations?

#3 Updated by Jukka Rahkonen about 11 years ago

Sorry, I should have checked the screen capture images.

I think that you are right and that should not happen. Perhaps the reason is still something XML related so that the slash truncates the line when it is saved into config file. Let's wait what the experts say.

#4 Updated by Paolo Cavallini almost 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - High Priority

#5 Updated by Sebastian Dietrich almost 9 years ago

  • Status changed from Open to Closed

Has been fixed a long time ago in #9131 by not allowing '/' within the name. This is because the name is used as a key for QSettings().

Also available in: Atom PDF