Bug 348 - Querybuilder and Download shapefile don't work when loading a context
: Querybuilder and Download shapefile don't work when loading a context
Status: CLOSED WORKSFORME
: Chameleon
Widget
: 1.99
: PC Windows 2000
: P2 normal
: 1.99 beta 2
Assigned To:
:
:
:
:
:
  Show dependency treegraph
 
Reported: 2004-04-08 03:03 by
Modified: 2004-06-24 15:29 (History)


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description From 2004-04-08 03:03:13
When loading a context into a Chameleon application, part of the functionality 
does not work anymore. The context was saved in a previous session.

The functionality that disappears is:
-Querbuilder
-Download shapefile

So maybe the DescribeLayer request is not working on Context map layers for 
some reason?
------- Comment #1 From 2004-04-08 08:32:26 -------
I think the problem is that when loading from a context, MapServer prepends l#:
to the layer name where # is the layer index.  This was put in place to attempt
to prevent duplicate layer names when loading contexts.

MapServer does place the original layer name from the context into the WMS_NAME
metadata on the layer.

These tools need to be checked to make sure that when they are looking for
layers they use both layer->name and layer->getMetadata( "WMS_NAME" )

Bart, can you describe more precisely how this functionality has 'disappeared'?
 Your symptoms will help us track down the right code more quickly.
------- Comment #2 From 2004-04-08 08:37:08 -------
updated version to 1.99
------- Comment #3 From 2004-04-08 08:44:48 -------
If I echo the $szWMSConnection in ExtractWFSData I get:

http://www.vz.geodan.nl:1111/cgi-bin/mapserv.exe?map=/ms4w/apps/general/map/gemeentes.map&VERSION=1.1.0&SERVICE=WMS&LAYERS=l1:Gemeentes&REQUEST=DESCRIBELAYER

So you're right Paul, something is prepended to the layer name which causes this. 
------- Comment #4 From 2004-04-15 15:49:58 -------
Bart can you please confirm if this is still a problem.  It's seems to be
fixed.
------- Comment #5 From 2004-04-15 16:04:31 -------
I just tried with the Chameleon 1.99 version I have and the problem still 
exists. I do get a nicer error message now. I tried the ExtractWFSData widget.

What it says is:
WMS describelayer request failed. The server returned the following: %1$sInvalid 
layer or none selected. Please ensure .....

The output file name box of the dialog contains the following:
l0:Gemeentes

But the WMS layer name is Gemeentes.

If you need anymore info, please ask.
------- Comment #6 From 2004-04-20 11:40:37 -------
Bart, when extracting from WMS layers currently the code will check the
wms_connection metadata string to see if it contains "LAYERS=" if it doesn't
then it will add it to the string using the wms_title metadata item.

I'm not sure if the code was always this way, or if this has been changed
recently.  This being the case, I cannot see how you can get a connection string
like "...&LAYERS=l1:Gemeentes..." unless it was in the connection sting to begin
with.

Please try the latest CVS version and if it is still a problem then please send
me your context file and/or any mapfiles that are having this problem.  Thanks.
------- Comment #7 From 2004-04-20 11:52:22 -------
I forgot to mention that the describelayer request is built the same way in the
expression builder widget which also works for me.
------- Comment #8 From 2004-04-20 12:50:02 -------
Hi Bill,

I see a lot of changes between my 1.99 version and the CVS version which could 
explain the difference.

Our server is down at the moment, but I will check this week so that we can 
close this bug.
------- Comment #9 From 2004-06-24 15:29:56 -------
closing bug..... nothing to verify