[Cartoweb-users] search plugin?

wochter wochter at seznam.cz
Fri Mar 9 13:53:35 EST 2007


Finally,
In cw3demo project plugin "search" works.
It seems this plugin will be very good, but actually is setup very
complicate. (for me)
Thanks to Oliver Christen for help.
In my own project search plugin doesn't work.

Do you know what does this failure mean?

 Failure

Class : CartocommonException
Message : Error [8, Undefined index:  ,
/var/www/cartoweb3/common/Encoding.php, 79]
Backtrace:

file: 79 - /var/www/cartoweb3/common/Encoding.php
call: Common::cartowebErrorHandler(8, "Undefined index:  ",
"/var/www/cartoweb3/common/Encoding.php", 79, Array(1))

file: 117 - /var/www/cartoweb3/common/Encoding.php
call: Encoder::getEncoder(Null)

file: 272 - /var/www/cartoweb3/plugins/search/common/Search.php
call: Encoder::decode("1003", Null)

file: 269 - /var/www/cartoweb3/plugins/search/client/ClientSearch.php
call: DbResultProvider->getResult(Object(SearchRequest))

file: 265 - /var/www/cartoweb3/client/ClientPluginHelper.php
call: ClientSearch->initializeResult(Null)

file: UNKNOWN - UNKNOWN
call: ServerCallerHelper->initializeResultHelper(Object(ClientSearch),
Object(MapResult))

file: 267 - /var/www/cartoweb3/common/PluginManager.php
call: call_user_func_array(Array(2), Array(2))

file: 320 - /var/www/cartoweb3/common/PluginManager.php
call: PluginManager->callPluginImplementing(Object(ClientSearch),
"ServerCaller", "initializeResult", Array(1))

file: 711 - /var/www/cartoweb3/client/Cartoclient.php
call: PluginManager->callEnabledPluginsImplementing(2, "ServerCaller",
"initializeResult", Array(1))

file: 1088 - /var/www/cartoweb3/client/Cartoclient.php
call: Cartoclient->callEnabledPluginsImplementing(2, "ServerCaller",
"initializeResult", Object(MapResult))

file: 1251 - /var/www/cartoweb3/client/Cartoclient.php
call: Cartoclient->doMain()

file: 38 - /var/www/cartoweb3/htdocs/client.php
call: Cartoclient->main()


--server_conf/myproject/search.ini
config.katc0606_par_bb.provider.type = fulltextTable
config.katc0606_par_bb.provider.table = katc0606_par_bb
config.katc0606_par_bb.provider.id = id
config.katc0606_par_bb.provider.columns = id, parcis
config.katc0606_par_bb.provider.fulltextColumns = parcis

--client_conf/search.ini
dsn = pgsql://siro:h@localhost:5432/gisdata

config.katc0606_par_bb.provider.type = server
config.katc0606_par_bb.formatter.type = smarty
config.katc0606_par_bb.formatter.template = search_results


Thanks for any help.


wochter


Oliver Christen  wrote / napísal(a):
> dont ask me why but it seems the parameter must be set on client side
> (client_conf/search.ini)
> and simply:
> dsn = pgsql://siro:h@localhost:5432/gisdata
> 
> if this doesnt work, I will have to bug the guy who coded that plugin
> for some more complet documentations
> 
> regards,
> Oliver
> 
> 
> 
> ----- Original Message ----- From: "wochter" <wochter at seznam.cz>
> To: "Oliver Christen" <oliver.christen at camptocamp.com>
> Sent: Friday, March 09, 2007 3:30 PM
> Subject: Re: [Cartoweb-users] search plugin?
> 
> 
> yes, sure. session was reseted.
> 
> -this is my client_conf/search.ini:
> config.katc0606_par_bb.provider.type = server
> config.katc0606_par_bb.formatter.type = smarty
> config.katc0606_par_bb.formatter.template = search_results
> 
> -this is my server_conf/search.ini:
> dbType = pgsql
> dsn = siro:h at localhost:5432/gisdata
> config.katc0606_par_bb.provider.type = fulltextTable
> config.katc0606_par_bb.provider.table = katc0606_par_bb
> config.katc0606_par_bb.provider.id = id
> config.katc0606_par_bb.provider.columns = id, parcis
> config.katc0606_par_bb.provider.fulltextColumns = parcis
> 
> -this is part of my mapfile:
> LAYER #katc0606_par_bb
>  NAME katc0606_par_bb
>  TYPE POLYGON
>  STATUS ON
>  CONNECTIONTYPE postgis
>    CONNECTION 'user=siro password=h dbname=gisdata host=localhost
> port=5432'
>    DATA "the_geom from katc0606_par_bb"
>    LABELITEM "PARCIS"
>    LABELMAXSCALE 2000
>  CLASS
>    NAME 'Kat C 0606 BB'
>    TEMPLATE 'ttt'
>    COLOR 183 188 222
>    OUTLINECOLOR 0 0 0
>      LABEL
>        TYPE TRUETYPE
>        FONT "Vera"
>        SIZE 8
>        COLOR 0 0 0
>        POSITION cc
>        BACKGROUNDCOLOR 230 230 10
>        BACKGROUNDSHADOWCOLOR 55 55 55
>        BACKGROUNDSHADOWSIZE 1 1
> SHADOWCOLOR 155 0 0
>        WRAP " "
>      END
>  END
>  METADATA
>   'exported_values' 'recenter_name_string,id_attribute_string'
>   'recenter_name_string' 'parcis'
>   'id_attribute_string' 'id|int'
>   'query_returned_attributes' 'parcis'
>  END
> END
> 
> 
> 
> Oliver Christen  wrote / napísal(a):
>> did you reset the session after you changed the parameters ?
>>
>>
>> ----- Original Message ----- From: "wochter" <wochter at seznam.cz>
>> To: "Oliver Christen" <oliver.christen at camptocamp.com>;
>> <cartoweb-users at lists.maptools.org>
>> Sent: Friday, March 09, 2007 2:36 PM
>> Subject: Re: [Cartoweb-users] search plugin?
>>
>>
>> I tried:
>> dbType = pgsql
>> dsn = user:pass at localhost:5432/gisdata
>>
>> but with the same result:
>>
>> Failure
>>
>> CartoWeb version: HEAD [$Revision: 1.5 $]
>> class:   CartocommonException
>> message:   Either DSN or DB type must be defined
>> Backtrace:
>>
>> file: 267 -
>> /var/www/cartoweb3/projects/wochter/plugins/search/common/Search.php
>> call: DbResultProvider->getDsn()
>>
>> file: 269 -
>> /var/www/cartoweb3/projects/wochter/plugins/search/client/ClientSearch.php
>>
>> call: DbResultProvider->getResult(Object(SearchRequest))
>>
>> file: 265 - /var/www/cartoweb3/client/ClientPluginHelper.php
>> call: ClientSearch->initializeResult(Null)
>>
>> file: UNKNOWN - UNKNOWN
>> call: ServerCallerHelper->initializeResultHelper(Object(ClientSearch),
>> Object(MapResult))
>>
>> file: 267 - /var/www/cartoweb3/common/PluginManager.php
>> call: call_user_func_array(Array(2), Array(2))
>>
>> file: 320 - /var/www/cartoweb3/common/PluginManager.php
>> call: PluginManager->callPluginImplementing(Object(ClientSearch),
>> "ServerCaller", "initializeResult", Array(1))
>>
>> file: 711 - /var/www/cartoweb3/client/Cartoclient.php
>> call: PluginManager->callEnabledPluginsImplementing(2, "ServerCaller",
>> "initializeResult", Array(1))
>>
>> file: 1088 - /var/www/cartoweb3/client/Cartoclient.php
>> call: Cartoclient->callEnabledPluginsImplementing(2, "ServerCaller",
>> "initializeResult", Object(MapResult))
>>
>> file: 1251 - /var/www/cartoweb3/client/Cartoclient.php
>> call: Cartoclient->doMain()
>>
>> file: 38 - /var/www/cartoweb3/htdocs/client.php
>> call: Cartoclient->main()
>>
>>
>>
>>
>> Oliver Christen  wrote / napísal(a):
>>> Hello,
>>> if I understand correctly whats is happening in the getDsn() function,
>>> it seems the parameters should be:
>>>
>>> dbType = pgsql
>>> dsn = user:pass at localhost:5432/gisdata
>>>
>>> regards
>>> Oliver
>>>
>>> hi,
>>>
>>> I use this:
>>> dbType = db
>>> dsn = pgsql://user:pass@localhost:5432/gisdata
>>>
>>> and here is the error log:
>>>
>>> Failure
>>>
>>> CartoWeb version: HEAD [$Revision: 1.5 $]
>>> class:   CartocommonException
>>> message:   Either DSN or DB type must be defined
>>> Backtrace:
>>>
>>> file: 267 -
>>> /var/www/cartoweb3/projects/wochter/plugins/search/common/Search.php
>>> call: DbResultProvider->getDsn()
>>>
>>> file: 269 -
>>> /var/www/cartoweb3/projects/wochter/plugins/search/client/ClientSearch.php
>>>
>>>
>>> call: DbResultProvider->getResult(Object(SearchRequest))
>>>
>>> file: 265 - /var/www/cartoweb3/client/ClientPluginHelper.php
>>> call: ClientSearch->initializeResult(Null)
>>>
>>> file: UNKNOWN - UNKNOWN
>>> call: ServerCallerHelper->initializeResultHelper(Object(ClientSearch),
>>> Object(MapResult))
>>>
>>> file: 267 - /var/www/cartoweb3/common/PluginManager.php
>>> call: call_user_func_array(Array(2), Array(2))
>>>
>>> file: 320 - /var/www/cartoweb3/common/PluginManager.php
>>> call: PluginManager->callPluginImplementing(Object(ClientSearch),
>>> "ServerCaller", "initializeResult", Array(1))
>>>
>>> file: 711 - /var/www/cartoweb3/client/Cartoclient.php
>>> call: PluginManager->callEnabledPluginsImplementing(2, "ServerCaller",
>>> "initializeResult", Array(1))
>>>
>>> file: 1088 - /var/www/cartoweb3/client/Cartoclient.php
>>> call: Cartoclient->callEnabledPluginsImplementing(2, "ServerCaller",
>>> "initializeResult", Object(MapResult))
>>>
>>> file: 1251 - /var/www/cartoweb3/client/Cartoclient.php
>>> call: Cartoclient->doMain()
>>>
>>> file: 38 - /var/www/cartoweb3/htdocs/client.php
>>> call: Cartoclient->main()
>>>
>>>
>>> Oliver Christen  wrote / napísal(a):
>>>> hello,
>>>> if you set your project profile to development, you should be able to
>>>> see the detail of the error received by ajax (the so called malformed
>>>> response).
>>>> let me know what the content of the error message, that will help to
>>>> know what happened.
>>>>
>>>> regards
>>>> Oliver
>>>>
>>>> ----- Original Message ----- From: "wochter" <wochter at seznam.cz>
>>>> To: "Oliver Christen" <oliver.christen at camptocamp.com>
>>>> Sent: Friday, March 09, 2007 1:26 PM
>>>> Subject: Re: [Cartoweb-users] search plugin?
>>>>
>>>>
>>>> Ou, thank you, that is what I need.
>>>> This plugin in cw3demo uses sqlite db.
>>>>
>>>> dbType = sqlite
>>>> dbFile = "projects/demoCW3/server_conf/demoCW3/sql/airports.db"
>>>> encodingContext = searchDb
>>>>
>>>> Can I use postgres/postgis?
>>>>
>>>> I tried this:
>>>> dbType = db
>>>> dsn = pgsql://user:pass@localhost:5432/gisdata
>>>>
>>>>
>>>> Error: AjaxHandler.actionRequest(): received response is malformed!
>>>>
>>>> How to use it please?
>>>>
>>>> thanx
>>>> wochter
>>>>
>>>>
>>>> Oliver Christen  wrote / napísal(a):
>>>>> Hi,
>>>>> in the lasted cvs version of Cartoweb there is a new search plugin,
>>>>> but
>>>>> obviously it is designed for generic search. If you want more specific
>>>>> interface, you will need to extend the plugin to suit your needs.
>>>>>
>>>>> Regards
>>>>> Oliver
>>>>>
>>>>>     ----- Original Message -----
>>>>>     *From:* Štefan Voskár <mailto:uhabb.voskar at zmail.sk>
>>>>>     *To:* cartoweb-users at lists.maptools.org
>>>>>     <mailto:cartoweb-users at lists.maptools.org>
>>>>>     *Sent:* Thursday, March 08, 2007 8:42 AM
>>>>>     *Subject:* [Cartoweb-users] search plugin?
>>>>>
>>>>>     I would be pleased at this possibility too...
>>>>>
>>>>>     My vision is:
>>>>>     step 1: possibility in "SEARCH TAB" to select from drop-down menu
>>>>>     layer of interest
>>>>>
>>>>>     step 2: Its columns wold be loaded on another drop-down..
>>>>>
>>>>>     step 3: possibility to choose =, <, > (for numerics fields) and
>>>>> LIKE
>>>>>     or IS (for text)
>>>>>
>>>>>     step 4: field to enter searched string
>>>>>
>>>>>     ...and result should create table of elements matching selected
>>>>>     criteria. Some attribute (ID or name...) would be active as
>>>>> link to
>>>>>     recenter it in map window...
>>>>>
>>>>>     If somebody likewise do this job, please help with some tips.
>>>>>     Thaks
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>>     _______________________________________________
>>>>>     Cartoweb-users mailing list
>>>>>     Cartoweb-users at lists.maptools.org
>>>>>     http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Cartoweb-users mailing list
>>>>> Cartoweb-users at lists.maptools.org
>>>>> http://lists.maptools.org/mailman/listinfo/cartoweb-users
>>>>
>>>>
>>>>
>>>
>>>
>>>
>>
>>
>>
> 
> 
> 




More information about the Cartoweb-users mailing list