<!DOCTYPE html><html><head><title></title><style type="text/css">
p.MsoNormal,p.MsoNoSpacing{margin:0}</style></head><body><div>Hi Rob,<br></div><div><br></div><div>You have 2 options:<br></div><div><br></div><ol><li>Update your front-end application to add &STYLES= to the querystring. This would make the requests compliant with the WMS specification. The STYLES parameter is used to select all CLASSes in a LAYER with the same CLASS GROUP - so a single layer could han have multiple styles and a front-end application can choose which one to use, Leaving STYLES= empty means the default style is used. See <a href="https://mapserver.org/mapfile/class.html#mapfile-class-group">https://mapserver.org/mapfile/class.html#mapfile-class-group</a> and <a href="https://mapserver.org/ogc/wms_server.html#test-with-a-getmap-request">https://mapserver.org/ogc/wms_server.html#test-with-a-getmap-request</a><br></li><li>Update your Mapfile to include "wms_allow_getmap_without_styles" "true" in your MAP WEB METADATA section to allow querystrings with a STYLES= parameter. E.g.<br></li></ol><div><br></div><div> MAP<br></div><div>   WEB<br></div><div>       METADATA<br></div><div>          "wms_allow_getmap_without_styles" "true"<br></div><div>          ...<br></div><div><br></div><div>Seth<br></div><div><br></div><div><br></div><div id="sig62266145"><div class="signature">--<br></div><div class="signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br></div><div class="signature">twitter: @geographika<br></div></div><div><br></div><div>On Sat, Aug 24, 2024, at 1:23 AM, Rob Dennett via MapServer-users wrote:<br></div><blockquote type="cite" id="qt" style=""><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);">Hi, <br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><div>Looking at the network tab for a page request which doesn't seem to be downloading our map following an upgrade to 8.0, I am seeing the following in the payload preview:<br></div><div> <br></div><div> <?xml version='1.0' encoding="UTF-8" standalone="no" ?><br></div></div><div style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><!DOCTYPE ServiceExceptionReport SYSTEM "http://schemas.opengis.net/wms/1.1.1/exception_1_1_1.dtd"><br></div><div style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><ServiceExceptionReport version="1.1.1"><br></div><div style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><ServiceException code="MissingParameterValue"><br></div><div style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);">msWMSLoadGetMapParams(): WMS server error. Missing required parameter STYLES. Note to service administrators: defining the &quot;wms_allow_getmap_without_styles&quot; &quot;true&quot; MAP.WEB.METADATA item will disable this check (backward compatibility with
 behaviour of MapServer &lt; 8.0)<br></div><div style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"></ServiceException><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"></ServiceExceptionReport><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><div>Part of the URL is <br></div></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);">format=image/png&service=WMS&version=1.1.1&request=GetMap&srs=EPSG:3857&transparent=true&width=256&height=256&layers=PolygonSources,LineSources,PointSources,AllSources<br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);">And I am guessing this all has something to do with <a href="https://github.com/mapserver/mapserver/issues/6012" id="qt-LPlnk"> https://github.com/mapserver/mapserver/issues/6012</a><br></div><div class="qt-_Entity qt-_EType_OWALinkPreview qt-_EId_OWALinkPreview qt-_EReadonly_1"><div id="qt-LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL21hcHNlcnZlci9tYXBzZXJ2ZXIvaXNzdWVzLzYwMTI." class="qt-LPBorder750414" style="width:100%;margin-top:16px;margin-bottom:16px;position:relative;max-width:800px;min-width:424px;"><table id="qt-LPContainer750414" role="presentation" style="padding-top:12px;padding-right:36px;padding-bottom:12px;padding-left:12px;width:100%;border-top-width:1px;border-right-width:1px;border-bottom-width:1px;border-left-width:1px;border-top-style:solid;border-right-style:solid;border-bottom-style:solid;border-left-style:solid;border-top-color:rgb(200, 200, 200);border-right-color:rgb(200, 200, 200);border-bottom-color:rgb(200, 200, 200);border-left-color:rgb(200, 200, 200);border-top-left-radius:2px;border-top-right-radius:2px;border-bottom-right-radius:2px;border-bottom-left-radius:2px;"><tbody><tr valign="top" style="border-spacing:0px;"><td><div id="qt-LPImageContainer750414" style="position:relative;margin-right:12px;height:120px;overflow-x:hidden;overflow-y:hidden;width:240px;"><a target="_blank" id="qt-LPImageAnchor750414" href="https://github.com/mapserver/mapserver/issues/6012"><img id="qt-LPThumbnailImageId750414" alt="" height="120" style="display:block;" width="240" src="https://opengraph.githubassets.com/d188ccef73ff8d7aa01a95c6437a0268e30e9267028bcb906547a2b2247562dd/MapServer/MapServer/issues/6012"></a><br></div></td><td style="width:100%;"><div id="qt-LPTitle750414" style="font-size:21px;font-weight:300;margin-right:8px;font-family:wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;margin-bottom:12px;"><a target="_blank" id="qt-LPUrlAnchor750414" href="https://github.com/mapserver/mapserver/issues/6012" style="text-decoration-line:none;text-decoration-style:solid;text-decoration-color:currentcolor;text-decoration-thickness:auto;color:var(--themePrimary);">MapServer treats WMS STYLES param as optional, but the WMS spec says it is mandatory · Issue #6012
 · MapServer/MapServer</a><br></div><div id="qt-LPDescription750414" style="font-size:14px;max-height:100px;color:rgb(102, 102, 102);font-family:wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;margin-bottom:12px;margin-right:8px;overflow-x:hidden;overflow-y:hidden;">We got a report that MapServer treats the WMS GetMap STYLES param as optional, but the WMS spec state that it should be mandatory. (I verified and GetMap STYLES is indeed mandatory in WMS 1.1.0, 1....<br></div><div id="qt-LPMetadata750414" style="font-size:14px;font-weight:400;color:rgb(166, 166, 166);font-family:wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif;">github.com<br></div></td></tr></tbody></table></div></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><div><br></div><div>The problem is that I don't know what the STYLES param is.  Is this related and if so, where can I learn about this to see what changes I need to make to my .map files?<br></div></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);"><br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);">Thanks,<br></div><div class="qt-elementToProof" style="font-family:Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif;font-size:12pt;color:rgb(0, 0, 0);">Rob<br></div><div>_______________________________________________<br></div><div>MapServer-users mailing list<br></div><div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br></div><div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br></div><div><br></div></blockquote><div><br></div></body></html>