<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div>Um. &nbsp;Yes.</div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; margin-top: 5px; padding-left: 5px;">  <div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "> <div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "> <font size="2" face="Arial"> <hr size="1">  <b><span style="font-weight:bold;">From:</span></b> "Ed Boesenberg, III" &lt;boesiii@yahoo.com&gt;<br> <b><span style="font-weight: bold;">To:</span></b> 'Dan Little' &lt;danlittle@yahoo.com&gt; <br><b><span style="font-weight: bold;">Cc:</span></b> geomoose-users@lists.osgeo.org <br> <b><span style="font-weight: bold;">Sent:</span></b> Wednesday, November 30, 2011 11:53 AM<br> <b><span style="font-weight: bold;">Subject:</span></b> RE: [Geomoose-users] Item Query Problems and
 Question<br> </font> <br>
<div id="yiv1321706724"><style><!--
#yiv1321706724  
 _filtered #yiv1321706724 {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered #yiv1321706724 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered #yiv1321706724 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
#yiv1321706724  
#yiv1321706724 p.yiv1321706724MsoNormal, #yiv1321706724 li.yiv1321706724MsoNormal, #yiv1321706724 div.yiv1321706724MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv1321706724 a:link, #yiv1321706724 span.yiv1321706724MsoHyperlink
        {color:blue;text-decoration:underline;}
#yiv1321706724 a:visited, #yiv1321706724 span.yiv1321706724MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
#yiv1321706724 p.yiv1321706724msonormal, #yiv1321706724 li.yiv1321706724msonormal, #yiv1321706724 div.yiv1321706724msonormal
        {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:"serif";}
#yiv1321706724 p.yiv1321706724msochpdefault, #yiv1321706724 li.yiv1321706724msochpdefault, #yiv1321706724 div.yiv1321706724msochpdefault
        {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:"serif";}
#yiv1321706724 span.yiv1321706724msohyperlink
        {}
#yiv1321706724 span.yiv1321706724msohyperlinkfollowed
        {}
#yiv1321706724 span.yiv1321706724emailstyle17
        {}
#yiv1321706724 p.yiv1321706724msonormal1, #yiv1321706724 li.yiv1321706724msonormal1, #yiv1321706724 div.yiv1321706724msonormal1
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"serif";}
#yiv1321706724 span.yiv1321706724msohyperlink1
        {color:blue;text-decoration:underline;}
#yiv1321706724 span.yiv1321706724msohyperlinkfollowed1
        {color:purple;text-decoration:underline;}
#yiv1321706724 span.yiv1321706724emailstyle171
        {font-family:"sans-serif";color:#1F497D;}
#yiv1321706724 p.yiv1321706724msochpdefault1, #yiv1321706724 li.yiv1321706724msochpdefault1, #yiv1321706724 div.yiv1321706724msochpdefault1
        {margin-right:0in;margin-left:0in;font-size:10.0pt;font-family:"serif";}
#yiv1321706724 span.yiv1321706724EmailStyle27
        {font-family:"sans-serif";color:#1F497D;}
#yiv1321706724 .yiv1321706724MsoChpDefault
        {font-size:10.0pt;}
 _filtered #yiv1321706724 {margin:1.0in 1.0in 1.0in 1.0in;}
#yiv1321706724 div.yiv1321706724WordSection1
        {}
--></style><div><div class="yiv1321706724WordSection1"><div class="yiv1321706724MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">Would this (see link) have anything to do with the problem?</span></div><div class="yiv1321706724MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; "> &nbsp;</span></div><div class="yiv1321706724MsoNormal">http://www.osgeo.org/pipermail/mapserver-dev/2010-April/009937.html<span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; "></span></div><div class="yiv1321706724MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; "> &nbsp;</span></div><div class="yiv1321706724MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; "> &nbsp;</span></div><div><div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;"><div
 class="yiv1321706724MsoNormal"><b><span style="font-size: 10pt; font-family: sans-serif; ">From:</span></b><span style="font-size: 10pt; font-family: sans-serif; "> Dan Little [mailto:danlittle@yahoo.com] <br><b>Sent:</b> Wednesday, November 30, 2011 9:55 AM<br><b>To:</b> Ed Boesenberg, III; 'Brent Fraser'<br><b>Cc:</b> geomoose-users@lists.osgeo.org<br><b>Subject:</b> Re: [Geomoose-users] Item Query Problems and Question</span></div></div></div><div class="yiv1321706724MsoNormal"> &nbsp;</div><div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">This is actually one of the problematic parts of using MapServer templates. &nbsp;It can be a real bugger to diagnose when it does work. &nbsp;Of course, when they do work they work beautifully.</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black;
 font-family: sans-serif; "> &nbsp;</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">The parameters for processquerytemplate are not related to the features list. &nbsp;They are "mostly" for internal MapServer business that we don't need to modify, hence, they are functionally both "null."</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "> &nbsp;</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">Dumping the result is the clearest cut way to see if anything is returned. &nbsp;If the result is blank there are a few causes:</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color:
 black; font-family: sans-serif; ">1) Complete feature miss.</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">2) Malformed Templates.</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "> &nbsp;</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">If you're getting results then I'd lean towards the second and try to figure out why MapServer is being so hateful. &nbsp;This particular diagnostic task has had me leaning towards getting MapServer *out* of the template business. &nbsp;Possibly OGR/GDAL bindings to python/ruby + Mako/Erb would be more useful. &nbsp;This does not help you but I feel better having espoused a potential long term fix to
 these troubles. &nbsp;:-)</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "> &nbsp;</span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "> &nbsp;</span></div></div><div><blockquote style="border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:3.75pt;margin-bottom:5.0pt;"><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "> &nbsp;</span></div><div><div><div class="yiv1321706724MsoNormal" align="center" style="text-align:center;background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "><hr size="1" width="100%" align="center"></span></div><div class="yiv1321706724MsoNormal"
 style="margin-bottom:12.0pt;background:white;"><b><span style="font-size: 10pt; color: black; font-family: sans-serif; ">From:</span></b><span style="font-size: 10pt; color: black; font-family: sans-serif; "> "Ed Boesenberg, III" &lt;boesiii@yahoo.com&gt;<br><b>To:</b> 'Dan Little' &lt;danlittle@yahoo.com&gt;; 'Brent Fraser' &lt;bfraser@geoanalytic.com&gt; <br><b>Cc:</b> geomoose-users@lists.osgeo.org <br><b>Sent:</b> Wednesday, November 30, 2011 8:16 AM<br><b>Subject:</b> RE: [Geomoose-users] Item Query Problems and Question</span><span style="color:black;"></span></div><div id="yiv1321706724"><div><div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">Dan,</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif;
 ">&nbsp;</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">Yes the template has the magic string.</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">&nbsp;</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">I was looking at query.php and dumping the results of some variables.&nbsp; Around line 359, an array is pushed out to variable $resultfeatures, when I dump that variable using var_export I am able to see that there is results getting passed.&nbsp; A few lines after that variable there is a line of code
 "$results = $map-&gt;processquerytemplate(array(), false);" which I am guessing processes the feature results using the template specified in the MAP file and pushes it out to html code.&nbsp; If I do a variable dump on $results it is blank.</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">&nbsp;</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">Is it possible that "processquerytemplate" is not working properly?</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">&nbsp;</span><span
 style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">Is there a simple way to test "processquerytemplate"?</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">&nbsp;</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">Ed</span><span style="color:black;"></span></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 11pt; color: rgb(31, 73, 125); font-family: sans-serif; ">&nbsp;</span><span style="color:black;"></span></div></div><div><div style="border:none;border-top:solid
 #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;"><div><div class="yiv1321706724MsoNormal" style="background:white;"><b><span style="font-size: 10pt; color: black; font-family: sans-serif; ">From:</span></b><span style="font-size: 10pt; color: black; font-family: sans-serif; "> Dan Little [mailto:danlittle@yahoo.com] <br><b>Sent:</b> Tuesday, November 29, 2011 1:44 PM<br><b>To:</b> Ed Boesenberg, III; 'Brent Fraser'<br><b>Cc:</b> geomoose-users@lists.osgeo.org<br><b>Subject:</b> Re: [Geomoose-users] Item Query Problems and Question</span><span style="color:black;"></span></div></div></div></div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="color:black;">&nbsp;</span></div></div><div><div><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">Do you have the magic string "&lt;!-- MapServer Template --&gt;" in your template file?</span><span
 style="color:black;"></span></div></div></div><div><blockquote style="border:none;border-left:solid #1010FF 1.5pt;padding:0in 0in 0in 4.0pt;margin-left:3.75pt;margin-top:3.75pt;margin-bottom:5.0pt;"><div><div class="yiv1321706724MsoNormal" style="background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; ">&nbsp;</span><span style="color:black;"></span></div></div><div><div><div class="yiv1321706724MsoNormal" align="center" style="text-align:center;background:white;"><span style="font-size: 10pt; color: black; font-family: sans-serif; "><hr size="1" width="100%" align="center"></span></div><div style="margin-bottom:12.0pt;"><div class="yiv1321706724MsoNormal" style="margin-bottom:12.0pt;background:white;"><b><span style="font-size: 10pt; color: black; font-family: sans-serif; ">From:</span></b><span style="font-size: 10pt; color: black; font-family: sans-serif; "> "Ed Boesenberg, III" &lt;boesiii@yahoo.com&gt;<br><b>To:</b>
 'Brent Fraser' &lt;bfraser@geoanalytic.com&gt; <br><b>Cc:</b> geomoose-users@lists.osgeo.org <br><b>Sent:</b> Thursday, November 10, 2011 3:31 PM<br><b>Subject:</b> RE: [Geomoose-users] Item Query Problems and Question<br></span><span style="color:black;"><br>Brent,<br><br>Not sure if this helps but below is the text from ms_error.txt:<br><br>[Thu Nov 10 16:29:44 2011].601000 msDrawMap(): WMS/WFS set-up and query,<br>0.000s<br>[Thu Nov 10 16:29:44 2011].601000 msDrawMap(): Layer 0 (ftma_waterlines),<br>0.000s<br>[Thu Nov 10 16:29:44 2011].601000 msDrawMap(): Drawing Label Cache, 0.000s<br>[Thu Nov 10 16:29:44 2011].601000 msDrawMap() total time: 0.001s<br>[Thu Nov 10 16:29:44 2011].738000 msSaveImage() total time: 0.137s<br>[Thu Nov 10 16:29:44 2011].741000 msSaveImage() total time: 0.001s<br>[Thu Nov 10 16:29:44 2011].742000 msLayerGetShape(): Shapefile error.<br>Shapefile layer has not been opened.<br>[Thu Nov 10 16:29:44 2011].743000 msFreeMap():
 freeing map at 038DB8A0.<br>[Thu Nov 10 16:29:44 2011].832000 CGI Request 1 on process 5960<br>[Thu Nov 10 16:29:44 2011].838000 msDrawMap(): WMS/WFS set-up and query,<br>0.000s<br>[Thu Nov 10 16:29:44 2011].851000 msDrawMap(): Layer 0 (ftma_waterlines),<br>0.013s<br>[Thu Nov 10 16:29:44 2011].851000 msDrawMap(): Drawing Label Cache, 0.000s<br>[Thu Nov 10 16:29:44 2011].851000 msDrawMap() total time: 0.019s<br>[Thu Nov 10 16:29:45 2011].231000 msSaveImage() total time: 0.380s<br>[Thu Nov 10 16:29:45 2011].234000 mapserv request processing time (loadmap<br>not incl.): 0.402s<br>[Thu Nov 10 16:29:45 2011].234000 msFreeMap(): freeing map at 01E1CA60.<br>[Thu Nov 10 16:29:44 2011].914000 msDrawMap(): WMS/WFS set-up and query,<br>0.000s<br>[Thu Nov 10 16:29:44 2011].914000 msDrawMap(): Layer 0 (ftma_waterlines),<br>0.000s<br>[Thu Nov 10 16:29:44 2011].914000 msDrawMap(): Drawing Label Cache, 0.000s<br>[Thu Nov 10 16:29:44 2011].914000 msDrawMap() total time:
 0.005s<br>[Thu Nov 10 16:29:45 2011].81000 msSaveImage() total time: 0.167s<br>[Thu Nov 10 16:29:45 2011].85000 msSaveImage() total time: 0.002s<br>[Thu Nov 10 16:29:45 2011].85000 msLayerGetShape(): Shapefile error.<br>Shapefile layer has not been opened.<br>[Thu Nov 10 16:29:45 2011].505000 msFreeMap(): freeing map at 03966668.<br><br>Ed<br><br>-----Original Message-----<br>From: Brent Fraser [mailto:<a rel="nofollow" ymailto="mailto:bfraser@geoanalytic.com" target="_blank" href="mailto:bfraser@geoanalytic.com">bfraser@geoanalytic.com</a>] <br>Sent: Thursday, November 10, 2011 3:35 PM<br>To: boesiii<br>Cc: <a rel="nofollow" ymailto="mailto:geomoose-users@lists.osgeo.org" target="_blank" href="mailto:geomoose-users@lists.osgeo.org">geomoose-users@lists.osgeo.org</a><br>Subject: Re: [Geomoose-users] Item Query Problems and Question<br><br>Try adding<br>DEBUG 5<br>to the mapfile and checking the messages in ms_error.txt<br><br>Best Regards,<br>Brent
 Fraser<br><br><br>On 11/10/2011 1:23 PM, boesiii wrote:<br>&gt; I tried to debug using firebug but didn't see anything obvious.&nbsp; The code<br>&gt; below is a result from the Firebug console:<br>&gt;<br>&gt; &lt;results&gt;&lt;html&gt;&lt;/html&gt;&lt;/results&gt;<br>&gt;<br>&gt; For some reason I don't think it is reading my<br>&gt; "ftma_waterlines_itemquery.html" but I am not positive.<br>&gt;<br>&gt; --<br>&gt; View this message in context:<br>http://geomoose-users.964460.n3.nabble.com/Geomoose-users-Item-Query-Problem<br>s-and-Question-tp3497288p3497875.html<br>&gt; Sent from the Geomoose-users mailing list archive at <a rel="nofollow" target="_blank" href="http://Nabble.com">Nabble.com</a>.<br>&gt; _______________________________________________<br>&gt; Geomoose-users mailing list<br>&gt; <a rel="nofollow" ymailto="mailto:Geomoose-users@lists.osgeo.org" target="_blank"
 href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a><br>&gt; http://lists.osgeo.org/mailman/listinfo/geomoose-users<br>&gt;<br><br>_______________________________________________<br>Geomoose-users mailing list<br><a rel="nofollow" ymailto="mailto:Geomoose-users@lists.osgeo.org" target="_blank" href="mailto:Geomoose-users@lists.osgeo.org">Geomoose-users@lists.osgeo.org</a><br><a rel="nofollow" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/geomoose-users">http://lists.osgeo.org/mailman/listinfo/geomoose-users</a></span></div></div></div></div></blockquote></div></div></div></div></div><div class="yiv1321706724MsoNormal" style="margin-bottom:12.0pt;background:white;"><span style="color:black;"> &nbsp;</span></div></div></div></blockquote></div></div></div></div></div><br><br> </div> </div> </blockquote></div>   </div></body></html>