[Geoserver-users] WMS GetFeatureInfo with "vendorParams" does not work like before after upgrade to 2.5.x

Last week I've upgraded to GeoServer 2.5.2 from 2.3.4 and now the same
GetFeatureInfo request in my web site returns different results.

I am using "vendorParams" to filter layers and their attributes because I
dont want to show all fields of a table in a popup when they made a query.

Code:
      
With GeoServer 2.3.4 if I run a WMS getFeatureInfo request using code above
it works like it should - it shows only desired attributes which are
mentioned in "vendorParams" and only from 2 layers i have stated in
"layers".

But after upgrade to 2.5.2 it looks like that you cannot put attributes from
more than 1 layer because it returns

*"Internal error occurred PropertyDescriptor is null - did you request a
property that does not exist?"*

<http://osgeo-org.1560.x6.nabble.com/file/n5155715/pitanje_za_geoserver_i_openlayers.jpg&gt;

If I leave only one layer in "layers" and its attributes in "vendorParams"
it works, but if you put more than one then throws an error.

Is this a bug or ...??

Thanks.

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-GetFeatureInfo-with-vendorParams-does-not-work-like-before-after-upgrade-to-2-5-x-tp5155715.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

I repeat part of a code, because it is not visible in my email client.

Code:
----------------------------------------------------------------------------------------------------
new OpenLayers.Control.WMSGetFeatureInfo(
{
url: "http://localhost/geoserver/waterworks/wms&quot;,
title: 'Identify',
layers: [water, waterconnections],
vendorParams: {propertyName:['STREET', 'MATERIAL', 'DN', 'HOUSE_NO',
'CUSTOMER', 'CODE', 'SOURCE']},
      ...
----------------------------------------------------------------------------------------------------

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-GetFeatureInfo-with-vendorParams-does-not-work-like-before-after-upgrade-to-2-5-x-tp5155715p5155721.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

This would be a bug (well a regressions since the functionality does not work as before). Please report it to Jira :slight_smile:

On the bright side GetFeatureInfo now respects your style settings, so you should get fewer false positives (where users click on something that is not actually displayed on the map they are looking at).

You may want to try an turning on the “old” implementation of GetFeatureInfo - just to see if it works better for your use case? See the docs for the command line option …

See http://osgeo-org.1560.x6.nabble.com/Improved-GetFeatureInfo-committed-on-trunk-td5094720.html

···

Jody Garnett

On Sun, Aug 10, 2014 at 2:42 PM, sys49152 <mr_bungle@anonymised.com> wrote:

Last week I’ve upgraded to GeoServer 2.5.2 from 2.3.4 and now the same
GetFeatureInfo request in my web site returns different results.

I am using “vendorParams” to filter layers and their attributes because I
dont want to show all fields of a table in a popup when they made a query.

Code:

With GeoServer 2.3.4 if I run a WMS getFeatureInfo request using code above
it works like it should - it shows only desired attributes which are
mentioned in “vendorParams” and only from 2 layers i have stated in
“layers”.

But after upgrade to 2.5.2 it looks like that you cannot put attributes from
more than 1 layer because it returns

“Internal error occurred PropertyDescriptor is null - did you request a
property that does not exist?”

<http://osgeo-org.1560.x6.nabble.com/file/n5155715/pitanje_za_geoserver_i_openlayers.jpg>

If I leave only one layer in “layers” and its attributes in “vendorParams”
it works, but if you put more than one then throws an error.

Is this a bug or …??

Thanks.


View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-GetFeatureInfo-with-vendorParams-does-not-work-like-before-after-upgrade-to-2-5-x-tp5155715.html
Sent from the GeoServer - User mailing list archive at Nabble.com.



Geoserver-users mailing list
Geoserver-users@anonymised.comsts.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-users

Thanks Jody.

Yeah, I am aware of /-Dorg.geoserver.wms.featureinfo.render.enabled=false/

but I am not sure where to put this line. I am using Windows 7 and Tomcat.
Is it here ?
<http://osgeo-org.1560.x6.nabble.com/file/n5155742/pitanje_za_geoserver_i_openlayers_apache_tomcat_1.jpg&gt;

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-GetFeatureInfo-with-vendorParams-does-not-work-like-before-after-upgrade-to-2-5-x-tp5155715p5155742.html
Sent from the GeoServer - User mailing list archive at Nabble.com.

jody.garnett wrote

This would be a bug (well a regressions since the functionality does not
work as before). Please report it to Jira :slight_smile:

Ive created account and post it to jira.
Sorry, I am not a developer so if something is missing don't be too hard on
me :slight_smile:

--
View this message in context: http://osgeo-org.1560.x6.nabble.com/WMS-GetFeatureInfo-with-vendorParams-does-not-work-like-before-after-upgrade-to-2-5-x-tp5155715p5155751.html
Sent from the GeoServer - User mailing list archive at Nabble.com.