Thanks Thomas, On 02/04/2012, at 4:55 PM, thomas bonfort wrote:
> if the validation fails, the default_xxx parameter is used instead, > which is why no further errors are reported. > > what are you sending in your url for CCODE ? I should have included it - sorry ! The url normally looks like : maps/index.php?page=details&ccode=EST&mapcode=156&year=2005&submit=submit 'tis unfortunately a local system, and the size of the data files somewhat limits my opportunity to put an example up somewhere. cheers Ben > On Mon, Apr 2, 2012 at 08:39, Ben Madin <li...@remoteinformation.com.au> > wrote: >> G'day all, >> >> I've noticed that when I turn layer (going out as a WMS service) debugging >> on, I am getting the messages shown below (the layer is rendering as I >> expected, with only the names for the selected country showing up). >> >> As I said, it is working, but what is wrong with my patterns - I suspect >> other layers with the same validation patterns would be giving the same >> errors, but I haven't investigated them (as they are working) >> >> My confusion is : >> >> Either the validation is working (and the log message is wrong), or >> >> I am failing to understand how the validation is meant to work, or >> >> The validation is failing, but not being respected… >> >> any clues >> >> cheers >> >> Ben >> >> >> >> Log messages : >> >> [Mon Apr 2 14:29:40 2012].960342 runtime substitution - Layer provnames, >> tag %CCODE%... >> [Mon Apr 2 14:29:40 2012].960725 msValidateParameter(): Regular expression >> error. Parameter pattern validation failed. >> [Mon Apr 2 14:29:40 2012].960759 msValidateParameter(): Regular expression >> error. Parameter pattern validation failed. >> [Mon Apr 2 14:29:40 2012].960775 runtime substitution - Layer provnames, >> tag %YEAR%... >> [Mon Apr 2 14:29:40 2012].961353 msDrawMap(): rendering using outputformat >> named AGG (AGG/PNG). >> [Mon Apr 2 14:29:40 2012].993291 msPostGISLayerIsOpen called. >> >> The layer has a validation pattern and defaults set: >> >> METADATA >> "wms_title" "provnames" >> "wms_srs" "EPSG:4326" >> "wms_group_title" "Administrative" >> "default_ccode" "AUS" >> "default_year" "2010" >> END >> VALIDATION >> 'ccode' '[A-Z]{3}' >> 'year' '20[0-1][0-9]' >> END >> >> and the query is : >> >> DATA "geom from ( >> SELECT recordid as gid, geom, name as pname >> FROM geolayer >> WHERE validitystarts <= '%YEAR%' >> AND (validityends >= '%YEAR%' OR validityends IS NULL) >> AND country LIKE '%CCODE%' >> ) AS foo USING UNIQUE gid USING SRID=4326" >> TYPE ANNOTATION >> labelmaxscaledenom 5000000 >> LABELITEM pname >> CLASS >> LABEL >> COLOR 150 150 250 >> OUTLINECOLOR 255 255 255 >> FONT "lucida" >> TYPE truetype >> SIZE 9 >> POSITION AUTO >> PARTIALS FALSE >> END >> END >> >> >> and the version is : >> >> MapServer version 6.0.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=KML >> SUPPORTS=PROJ SUPPORTS=AGG SUPPORTS=CAIRO SUPPORTS=FREETYPE SUPPORTS=ICONV >> SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER >> SUPPORTS=WFS_CLIENT SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER SUPPORTS=THREADS >> SUPPORTS=GEOS INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE >> >> _______________________________________________ >> mapserver-users mailing list >> mapserver-users@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/mapserver-users _______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users