GetFeatureInfo error for requests with both queryable and non-queryable layers

Description

WMS GetFeatureInfo requests are allowed to contain non-queryable layers and layer groups as long as there is at least one queryable layer in the request. However, the code in org.geoserver.wms.map.GetMapKvpRequestReader that is filtering the non-queryable layers and layer groups from the request only removes the layers and not their corresponding styles and cql_filter or filter. This can cause the styles and filters to be assigned to the wrong layer which can cause incorrect output or errors, such as "The requested Style can not be used with this layer.".

Environment

None

Status

Assignee

Unassigned

Reporter

Steve Ikeoka

Triage

None

Fix versions

Affects versions

Components

Priority

Medium
Configure