<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Well yes, you got it right, it is empty. So to fill it, what do I have
to put in ?<br>
<br>
Véronique<br>
<br>
<br>
Oliver Christen a écrit :
<blockquote cite="mid00fd01c780f0$56b7f030$15e3a8c0@maunakea"
type="cite">
<title></title>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<meta content="MSHTML 6.00.5730.11" name="GENERATOR">
<div><font size="2">I forgot to say the most important:</font></div>
<div><font size="2">be sure the value of that input is not empty</font></div>
<div> </div>
<div><font size="2">regards</font></div>
<div><font size="2">Oliver</font></div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><font
size="2">Hi</font></div>
<div> </div>
<div><font size="2">there are no search_config parameter set in the
post request. I think the main search input name must be search_config</font></div>
<div><font size="2">do you have a <input type="hidden"
id="search_config" name="search_config" element in your search
template ?</font></div>
<div> </div>
<div><font size="2">regards</font></div>
<div><font size="2">Oliver</font></div>
<div> </div>
<blockquote
style="border-left: 2px solid rgb(0, 0, 0); padding-right: 0px; padding-left: 5px; margin-left: 5px; margin-right: 0px;">
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;">-----
Original Message ----- </div>
<div
style="background: rgb(228, 228, 228) none repeat scroll 0%; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>From:</b>
<a title="veroh@bluewin.ch" href="mailto:veroh@bluewin.ch">Véro
Herzl - Bluewin</a> </div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>To:</b>
<a title="damien.corpataux@camptocamp.com"
href="mailto:damien.corpataux@camptocamp.com">Damien Corpataux</a> ; <a
title="cartoweb-users@lists.maptools.org"
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</a>
</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Sent:</b>
Tuesday, April 17, 2007 2:21 PM</div>
<div
style="font-family: arial; font-style: normal; font-variant: normal; font-weight: normal; font-size: 10pt; line-height: normal; font-size-adjust: none; font-stretch: normal;"><b>Subject:</b>
Re: [Cartoweb-users] Plugin search not working</div>
<div><br>
</div>
OK, well, I am in the development mode but with Ajax on and
cartoclient.Ajaxheader,tpl, so the error message is for the Ajay part<br>
<br>
<pre wrap="">--- Action Search.DoIt triggered ---
Calling Search.DoIt onBeforeAjaxCall()
Calling AjaxPlugins.Common.onBeforeAjaxCall()
Initiating AJAX request
Pending actions: 1
GET params:
ajaxActionRequest=Search.DoIt&
POST params:
posted=1&js_folder_idx=5&js_toolbar_idx=&selection_type=&selection_coords=&features=&js_accounting=version=0;
hasJava=true;winInnerWidth=1024;winInnerHeight=578;screenWidth=1024;
screenHeight=768;screenColorDepth=32&outline_label_text=votre
titre&tool=zoomin&project=n16&recenter_x=&recenter_y=&recenter_doit=0&shortcut_doit=0&openNodes=&layers
[]=OPA&layers[]=OPB&layers[]=OPC&layers[]=OPD&layers[]=OPE&layers[]
=OPF&layers[]=OPG&layers[]=OPH&layers[]=N16&layers[]
=POSTGIS_MAJ&layers[]=EDITPOINT&layers[]=EDITPOLY&layers[]
=EDITLINE&pdfMarginX=20&pdfMarginY=20&pdfA4x=210&pdfA4y=297&pdfA3x=297&pdfA3y=420&pdfOrientation=portrait&pdfMapAngle=&pdfMapCenterX=&pdfMapCenterY=&pdfTitle=&pdfNote=&pdfScalebar=&pdfLegend=0&viewTitle=&author=&handleView=0&locate_MAJ=&locate_MAJ2=&id_recenter_ids=&search_mandat_n16=N2354&search_travaux=&search_date_txt=&search_en_cours=&search_config=&search_sort_column=&search_sort_direction=asc&search_number=&outline_mask=no&outline_point_symbol=circle&outline_point_size=10&outline_line_size=3&outline_line_transparency=100&outline_polygon_transparency=60&edit_validate_all=0&recenter_scale=0&shortcut_id=-
1&mapsize=1&pdfFormat=A4&pdfResolution=96&pdfScale=2500&id_recenter_layer=MAJ&edit_layer=0&
Waiting for response...
Response received!
Error: AjaxHandler.actionRequest(): received response is
malformed!
</pre>
And below it, I got the following failure :<br>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">Failure<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">CartoWeb version: 3.3.0
[$Revision: 1.2 $]<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">class:<span> </span>CartoclientException<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">message:<span> </span>Empty
config or config not found<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">Backtrace:<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: UNKNOWN - UNKNOWN<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
ClientSearch->handleHttpPostRequest(Array(62))<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 270 -
C:\wamp\www\cartoweb3\common\PluginManager.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
call_user_func_array(Array(2), Array(1))<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 320 -
C:\wamp\www\cartoweb3\common\PluginManager.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
PluginManager->callPluginImplementing(Object(ClientSearch),
"GuiProvider", "handleHttpPostRequest", Array(1))<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 685 -
C:\wamp\www\cartoweb3\client\Cartoclient.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
PluginManager->callEnabledPluginsImplementing(1, "GuiProvider",
"handleHttpPostRequest", Array(1))<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 995 -
C:\wamp\www\cartoweb3\client\Cartoclient.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
Cartoclient->callEnabledPluginsImplementing(1, "GuiProvider",
"handleHttpPostRequest", Array(62))<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 1220 -
C:\wamp\www\cartoweb3\client\Cartoclient.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
Cartoclient->doMain()<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 38 -
C:\wamp\www\cartoweb3\htdocs\client.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
Cartoclient->main()<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">file: 3 -
C:\wamp\www\cartoweb3\htdocs\n16.php<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;">call:
require_once("C:\wamp\www\cartoweb3\htdocs\client.php")<O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<p class="MsoNormal"><span
style="font-size: 10pt; font-family: Arial;"><O:P></O:P></span></p>
<br>
<br>
<br>
Damien Corpataux a écrit :
<blockquote cite="mid46249848.70502@camptocamp.com" type="cite">Hello,<br>
<br>
if you are in development mode, when an error occurs, an alert box is
displayed and allows you to print the cartoweb error message. Can you
post this error message?<br>
<br>
Regards,<br>
Damien<br>
<br>
<br>
<a class="moz-txt-link-abbreviated"
href="mailto:veroh@bluewin.ch">veroh@bluewin.ch</a> wrote:
<blockquote
cite="mid4600407.692851176799710599.JavaMail.webmail@lps6zhh.bluewin.ch"
type="cite">
<pre wrap="">Hello,
I am trying to implement the plugin search in my project but I got
the following error
--- Action Search.DoIt triggered ---
Calling Search.DoIt onBeforeAjaxCall()
Calling AjaxPlugins.Common.onBeforeAjaxCall()
Initiating AJAX request
Pending actions: 1
GET params:
ajaxActionRequest=Search.DoIt&
POST params:
posted=1&js_folder_idx=5&js_toolbar_idx=&selection_type=&selection_coords=&features=&js_accounting=version=0;
hasJava=true;winInnerWidth=1024;winInnerHeight=578;screenWidth=1024;
screenHeight=768;screenColorDepth=32&outline_label_text=votre
titre&tool=zoomin&project=n16&recenter_x=&recenter_y=&recenter_doit=0&shortcut_doit=0&openNodes=&layers
[]=OPA&layers[]=OPB&layers[]=OPC&layers[]=OPD&layers[]=OPE&layers[]
=OPF&layers[]=OPG&layers[]=OPH&layers[]=N16&layers[]
=POSTGIS_MAJ&layers[]=EDITPOINT&layers[]=EDITPOLY&layers[]
=EDITLINE&pdfMarginX=20&pdfMarginY=20&pdfA4x=210&pdfA4y=297&pdfA3x=297&pdfA3y=420&pdfOrientation=portrait&pdfMapAngle=&pdfMapCenterX=&pdfMapCenterY=&pdfTitle=&pdfNote=&pdfScalebar=&pdfLegend=0&viewTitle=&author=&handleView=0&locate_MAJ=&locate_MAJ2=&id_recenter_ids=&search_mandat_n16=N2354&search_travaux=&search_date_txt=&search_en_cours=&search_config=&search_sort_column=&search_sort_direction=asc&search_number=&outline_mask=no&outline_point_symbol=circle&outline_point_size=10&outline_line_size=3&outline_line_transparency=100&outline_polygon_transparency=60&edit_validate_all=0&recenter_scale=0&shortcut_id=-
1&mapsize=1&pdfFormat=A4&pdfResolution=96&pdfScale=2500&id_recenter_layer=MAJ&edit_layer=0&
Waiting for response...
Response received!
Error: AjaxHandler.actionRequest(): received response is
malformed!
I have a search.ini file in my client_conf :
config.POSTGIS_MAJ.provider.type = fulltextTable
config.POSTGIS_MAJ.provider.table = maj2
config.POSTGIS_MAJ.provider.id = gid
config.POSTGIS_MAJ.provider.columns = mandat_n16, travaux,
date_txt, en_cours
config.POSTGIS_MAJ.provider.fulltextColumns = mandat_n16, travaux,
date_txt, en_cours
config.POSTGIS_MAJ.provider.sortColumn = date_txt
config.POSTGIS_MAJ.provider.sortDirection = asc
config.POSTGIS_MAJ.provider.sortPriorities = date_txt, mandat_n16,
travaux, en_cours
config.POSTGIS_MAJ.provider.labels = mandat_n16, travaux, date_txt,
en_cours
config.POSTGIS_MAJ.formatter.type = smarty
config.POSTGIS_MAJ.formatter.template = search_results
Where POSTGIS is the layer I declared in my MAP file which is a
POSTGRESQL/POSTGIS table (maj2) and gid is the 'id_attribute_string'
I have also one in the server_side :
dbType = pgsql
dsn = pgsql://postgres:afgan6@localhost:5432/demo_n16
config.POSTGIS_MAJ.provider.type = fulltextTable
config.POSTGIS_MAJ.provider.table = maj2
config.POSTGIS_MAJ.provider.id = gid
config.POSTGIS_MAJ.provider.columns = mandat_n16, travaux,
date_txt, en_cours
config.POSTGIS_MAJ.provider.fulltextColumns = mandat_n16, travaux,
date_txt, en_cours
config.POSTGIS_MAJ.provider.sortColumn = date_txt
config.POSTGIS_MAJ.provider.sortDirection = asc
config.POSTGIS_MAJ.provider.sortPriorities = date_txt, mandat_n16,
travaux, en_cours
config.POSTGIS_MAJ.provider.labels = mandat_n16, travaux, date_txt,
en_cours
config.POSTGIS_MAJ.formatter.type = smarty
config.POSTGIS_MAJ.formatter.template = search_results
I modified my cartoclient.tpl by adding two lines
{if $search_active|default:''}<script type="text/javascript" src="
{r type=js plugin=search}Search.ajax.js{/r}"></script>{/if}
which is just after the one for the Ajax ({if $ajaxOn|default:''}
etc..)
and in the div="container", I added in one of my div=folder :
{if $search_active|default:''} {$search} {/if}
I got in templates, two files :
search.tpl:
<div id="search_div">
        <fieldset>
                <legend>{t}Search{/t}
                </legend>
                <br/>
                <table width="100%">
                        <tr>
                        <td>
                                {t}Mandat: {/t}
                        </td>
                        
                        <td>
                                <input type="text" id="search_mandat_n16" name="
search_mandat_n16" size="13"/>
                        </td>
                        </tr>
                        
                        <tr>
                        <td>
                                {t}Type de travaux: {/t}
                        </td>
                        
                        <td>
                                <input type="text" id="search_travaux" name="search_travaux"
size="13"/>
                        </td>
                        </tr>
                        <tr>
                        <td>
                                {t}Date: {/t}
                        </td>
                        
                        <td>
                                <input type="text" id="search_date_txt" name="search_date_txt"
size="13"/>
                        </td>
                        </tr>                        
                        
                        <tr>
                        <td>
                                {t}En cours ou non: {/t}
                        </td>
                        
                        <td>
                                <input type="text" id="search_en_cours" name="search_en_cours"
size="13"/>
                        </td>
                        </tr>
                </table>
                
                <p>
                        <input type="submit" value="{t}Search{/t}" class="form_button"
onclick="Javascript: CartoWeb.trigger('Search.DoIt'); return false;"
/>
                        <input type="hidden" id="search_config" name="search_config" />
                        <input type="hidden" id="search_sort_column" name="
search_sort_column" />
                        <input type="hidden" id="search_sort_direction" name="
search_sort_direction" value="asc" />
                        <input type="hidden" id="search_number" name="search_number" />
                                        
                        <div id="search_results_div">
                        </div>
                </p>
        </fieldset>
</div>
and search_results.tpl
{if $table->numRows > 0}
        <table class="n16table">
                <tr>
                        <th>
                                {t}Id{/t}
                        </th>
                        {foreach from=$table->columnIds item=column}
                                <th>
                                        <a href="Javascript: order('{$column}');">{t}{$column}{/t}
</a>
                                </th>
                        {/foreach}
                </tr>
                
                {foreach from=$table->rows item=row}
                <tr>
                {foreach from=$row->cells item=value}
                <td>
                        <a href="Javascript: recenter('{$row->rowId}');">{$value}</a>
                </td>
                {/foreach}
                </tr>
                {/foreach}
        </table>
{else}
{t}No results{/t}
{/if}
Last but not least, I got the js ! Namely Search.ajax.js
AjaxPlugins.Search = {
handleResponse: function(pluginOutput) {
if (pluginOutput.htmlCode.POSTGIS_MAJ)
$('search_results').innerHTML = pluginOutput.htmlCode.
POSTGIS_MAJ;
                        }
                        };
/*
* Search plugin's Actions
*/
AjaxPlugins.Search.Actions = {};
AjaxPlugins.Search.Actions.DoIt = {
buildPostRequest: function(argObject) {
return AjaxHandler.buildPostRequest();
}
};
function order(column) {
if (column != $('search_sort_column').value){
        $('search_sort_column').value = column;
        $('search_sort_direction').value = 'asc';
        } else {
        if ($('search_sort_direction').value == 'asc') {
        $('search_sort_direction').value = 'desc';
        } else {
        $('search_sort_direction').value = 'asc';
        }
        }
CartoWeb.trigger('Search.DoIt');
}
function recenter(id) {
        if ($('search_config').value == 'POSTGIS_MAJ') {
$('id_recenter_ids').value = gid; //id to recenter
        $('recenter_scale').value = 1000; //scale for recentering
        $('recenter_doit').value = '1';
CartoWeb.trigger('Location.Recenter');
}
I guess you now know all I did. Could someone please tell me what
is wrong.
Apparently, someone else asked the same thing last month but no
final answer was given on the mail list.
PS : Yes, I did clean all the file before trying
Véronique
_______________________________________________
Cartoweb-users mailing list
<a class="moz-txt-link-abbreviated"
href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</a>
<a class="moz-txt-link-freetext"
href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a>
</pre>
</blockquote>
<br>
<br>
<div class="moz-signature">-- <br>
<style>.signature {
        FONT-SIZE: 0.8em; WIDTH: 27em; COLOR: #9999bb; LINE-HEIGHT: 1.25em; FONT-FAMILY: verdana,helvetica,sans-serif
}
.signature DIV {
        PADDING-RIGHT: 0.22em; MARGIN-TOP: 0.5em; PADDING-LEFT: 0.22em; MARGIN-BOTTOM: 0.5em; PADDING-BOTTOM: 0.22em; PADDING-TOP: 0.22em; BORDER-BOTTOM: 1px dotted; BACKGROUND-COLOR: #fcfcff
}
.signature .attention {
        FONT-WEIGHT: bold; FONT-SIZE: 0.8em; COLOR: #ffbbbb; BACKGROUND-COLOR: #fffafa
}
.header {
        
}
</style>
<div class="signature">
<div><span style="font-weight: bold;">Camptocamp SA</span><br>
Damien Corpataux<br>
PSE A<br>
CH-1015 Lausanne<br>
</div>
<div>+41 21 619 10 22 <span class="header">(Direct)</span><br>
+41 21 619 10 10 <span class="header">(Centrale)</span><br>
+41 21 619 10 00 <span class="header">(Fax)</span><br>
</div>
<div style="color: rgb(102, 204, 102);"><span
style="font-size: 24pt; font-family: Webdings; position: relative; top: -3px;">P</span>
<span>Please consider the environment <br>
Do you really need to print this email?</span> </div>
</div>
</div>
</blockquote>
<br>
<p> </p>
<hr> _______________________________________________<br>
Cartoweb-users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br>
</blockquote>
<p> </p>
<hr> _______________________________________________<br>
Cartoweb-users mailing list<br>
<a class="moz-txt-link-abbreviated" href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</a><br>
<a class="moz-txt-link-freetext" href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users</a><br>
</blockquote>
</blockquote>
<br>
</body>
</html>