[Cartoweb-users] Tooltips plugin: DB table name is not set...

Oliver Christen oliver.christen at camptocamp.com
Tue Sep 16 08:29:32 EDT 2008


mmm, underscore shouldnt cause any problem.

the error is quite clear, the table name is not available when the plugin 
try to use it, so one way or another it is not set correctly or lost 
somewhere.

in file ToolTipsService.php, in function setQueryableLayerMembers, add a

print $layerId;
print_r($layer);

$layerId should be the same as the tooltips.xxx.yyy parameters.

I see you used village and villages, which one is correct ?





Hi Oliver,
I effectively found an error in the config with your debuging help with
adding print_r($configStruct->tooltips) ti TooTipsService.php.
There was an error in the dsn:
tooltips.village.dsn = "pqsql://@DB_USER@:@DB_PASSWD@@@DB_HOST/@DB_NAME@
... a missing @ after DB_HOST.

...but the problem persists! Still the same error. But the table and all
other items are correct now in the output of this print_r insert:

stdClass Object ( [villages] => stdClass Object ( [label] => Settlements
[dsn] => pqsql://PG_USER:PG_PASSWORD@PG_HOST/tajik_wb
tooltips.villages.dbTableName = tj_annotations
tooltips.villages.attributes = textstring, feature [srid] => 28472 )

(I just anonymised sensible attributes, but you can see the table name.
Shouldn't have problems with undersore, no?

What's the problem with the File named 'UNKNOWN' in the Debugging trace
back output in my first email (still the same output now) ?

Sincerely

Kurt Gerber


Am Montag, den 15.09.2008, 08:56 +0200 schrieb Oliver Christen:
> Hi
>
> your config seems ok.
>
> please verify the .ini is generated correcty and contains the correct
> dbTableName.
> also do a cw3setup.php --clean and a ?reset_session to be sure the
> parameteres are correctly taken into account
>
> if it still doesnt work, you may add a print_r($configStruct->tooltips) in
> ToolTipsService.php on line 91 just after $configStruct =
> StructHandler::loadFromArray($iniArray);
> it will display the content of the loaded config as seems by the 
> application
>
> regards
> Oliver
>
> ----- Original Message ----- 
> From: "Kurt Gerber" <kurt.gerber at cde.unibe.ch>
> To: <cartoweb-users at lists.maptools.org>
> Sent: Friday, September 12, 2008 4:30 PM
> Subject: [Cartoweb-users] Tooltips plugin: DB table name is not set...
>
>
> > Hi
> > On our Cartoweb 3.4 I have configured the toolTips plugin as follows:
> >
> > tooltips.ini.in:
> >
> > tooltips.village.label = "Settlements"
> > tooltips.village.dsn = "pqsql://@DB_USER@:@DB_PASSWD@@@DB_HOST/@DB_NAME@
> > tooltips.village.dbTableName = tj_annotations
> > tooltips.village.attributes = "textstring, feature"
> > tooltips.village.srid = 28472
> > tooltips.village.template = layerResult.tpl
> >
> >
> > the postgis connection details as well as the table name are working
> > will in the mapfile.map.in on the server side.
> > But when I activate the toolTips plugin on the client side with this
> > settings, I receive the following error message, when I load the map in
> > the browser:
> >
> >
> > lass : CartoclientException
> > Message : DB table name is not set for layer id:village
> > Backtrace:
> >
> > file: 145 - 
> > /var/www/cartoweb3/plugins/toolTips/client/ToolTipsService.php
> > call:
> > ToolTipsService->setQueryableLayerMembers(Object(ByXyQueryableLayer),
> > Object(stdClass), "village")
> >
> > file: 96 - 
> > /var/www/cartoweb3/plugins/toolTips/client/ToolTipsService.php
> > call: ToolTipsService->addByXyQueryableLayers(Object(stdClass))
> >
> > file: 128 - 
> > /var/www/cartoweb3/plugins/toolTips/client/ClientToolTips.php
> > call: ToolTipsService->__construct(Object(Cartoclient))
> >
> > file: 91 - /var/www/cartoweb3/plugins/toolTips/client/ClientToolTips.php
> > call: ClientToolTips->isToolTipsActive()
> >
> > file: UNKNOWN - UNKNOWN
> > call: ClientToolTips->renderForm(Object(Smarty_Cartoclient))
> >
> > file: 270 - /var/www/cartoweb3/common/PluginManager.php
> > call: call_user_func_array(Array(2), Array(1))
> >
> > file: 285 - /var/www/cartoweb3/common/PluginManager.php
> > call: PluginManager->callPluginImplementing(Object(ClientToolTips),
> > "GuiProvider", "renderForm", Array(1))
> >
> > file: 693 - /var/www/cartoweb3/client/Cartoclient.php
> > call: PluginManager->callPluginsImplementing("GuiProvider", 
> > "renderForm",
> > Array(1))
> >
> > file: 375 - /var/www/cartoweb3/client/FormRenderer.php
> > call: Cartoclient->callPluginsImplementing("GuiProvider", "renderForm",
> > Object(Smarty_Cartoclient))
> >
> > file: 326 - /var/www/cartoweb3/client/FormRenderer.php
> > call: FormRenderer->showForm()
> >
> > file: 1112 - /var/www/cartoweb3/client/Cartoclient.php
> > call: FormRenderer->render()
> >
> > file: 1261 - /var/www/cartoweb3/client/Cartoclient.php
> > call: Cartoclient->doMain()
> >
> > file: 33 - /var/www/cartoweb3/htdocs/client.php
> > call: Cartoclient->main()
> >
> > file: 3 - /var/www/cartoweb3/htdocs/TajikWb.php
> > call: require_once("/var/www/cartoweb3/htdocs/client.php")
> >
> >
> >
> > It says, that the table name is not set, but that's not true.
> > Or have I overseen something?
> >
> >
> > Sincerely
> >
> > Kurt Gerber
> >
> > -- 
> > ********************************************
> >
> > Centre for Development and Environment
> > Institute of Geography University Bern
> > Hallerstrasse 10
> > 3012 Bern
> >
> > phone: +41(0)31 631 88 37
> > fax:   +41(0)31 631 85 44
> >
> > e-mail: kurt.gerber at cde.unibe.ch
> >
> > www: http://www.cde.unibe.ch
> >
> > ********************************************
> >
> > _______________________________________________
> > Cartoweb-users mailing list
> > Cartoweb-users at lists.maptools.org
> > http://lists.maptools.org/mailman/listinfo/cartoweb-users
> >
>
-- 
********************************************

Centre for Development and Environment
Institute of Geography University Bern
Hallerstrasse 10
3012 Bern

phone: +41(0)31 631 88 37
fax:   +41(0)31 631 85 44

e-mail: kurt.gerber at cde.unibe.ch

www: http://www.cde.unibe.ch

********************************************



More information about the Cartoweb-users mailing list