[Cartoweb-users] layers.ini dropdown

Oliver Christen oliver.christen at camptocamp.com
Tue Mar 25 04:36:37 EDT 2008


well, this case was simply never handled.

the function getLayersMask that handle the children layers of a dropdown 
doesnt check if a layer is restricted or not before trying to set the active 
layer. (or in other words, the children layer list is not updated to take 
into account the change of accessibility level)

it would certainly be possible to modify the function a bit to handle that 
case. I cant say more without testing myself.

regards
Oliver

----- Original Message ----- 
From: "Lauber Christoph" <ch.lauber at geo-thun.ch>
To: "Oliver Christen" <oliver.christen at camptocamp.com>; 
<cartoweb-users at lists.maptools.org>
Sent: Tuesday, March 25, 2008 9:28 AM
Subject: AW: [Cartoweb-users] layers.ini dropdown


The restricted (just for logged users) layer RNP was previously selected. In 
case a public layer ist selected the error won't occur.

-----Ursprüngliche Nachricht-----
Von: Oliver Christen [mailto:oliver.christen at camptocamp.com]
Gesendet: Dienstag, 25. März 2008 09:14
An: Lauber Christoph; cartoweb-users at lists.maptools.org
Betreff: Re: [Cartoweb-users] layers.ini dropdown


was the layer RNP previously selected in the dropdown before the error
occure ?
or does the error happens whatever the layer selected in the dropdown ?


Hi Oliver

This is the complete backtrace.

Class : CartoclientException
Message : unknown layer name: RNP
Backtrace:

file: 907 - /var/www/cartoweb330/coreplugins/layers/client/ClientLayers.php
call: ClientLayers->getLayerByName("RNP")

file: 926 - /var/www/cartoweb330/coreplugins/layers/client/ClientLayers.php
call: ClientLayers->getLayersMask("RNP", False)

file: 932 - /var/www/cartoweb330/coreplugins/layers/client/ClientLayers.php
call: ClientLayers->getLayersMask("Kartenvorwahl", False)

file: 943 - /var/www/cartoweb330/coreplugins/layers/client/ClientLayers.php
call: ClientLayers->getLayersMask("root", False)

file: 227 - /var/www/cartoweb330/client/ClientPluginHelper.php
call: ClientLayers->buildRequest()

file: UNKNOWN - UNKNOWN
call: ServerCallerHelper->buildRequestHelper(Object(ClientLayers),
Object(MapRequest))

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

file: 320 - /var/www/cartoweb330/common/PluginManager.php
call: PluginManager->callPluginImplementing(Object(ClientLayers),
"ServerCaller", "buildRequest", Array(1))

file: 685 - /var/www/cartoweb330/client/Cartoclient.php
call: PluginManager->callEnabledPluginsImplementing(2, "ServerCaller",
"buildRequest", Array(1))

file: 1049 - /var/www/cartoweb330/client/Cartoclient.php
call: Cartoclient->callEnabledPluginsImplementing(2, "ServerCaller",
"buildRequest", Object(MapRequest))

file: 1237 - /var/www/cartoweb330/client/Cartoclient.php
call: Cartoclient->doMain()

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

file: 3 - /var/www/cartoweb330/htdocs/be-geo.php
call: require_once("/var/www/cartoweb330/htdocs/client.php")

regards
Christoph

-----Ursprüngliche Nachricht-----
Von: Oliver Christen [mailto:oliver.christen at camptocamp.com]
Gesendet: Dienstag, 25. März 2008 08:45
An: Lauber Christoph; cartoweb-users at lists.maptools.org
Betreff: Re: [Cartoweb-users] layers.ini dropdown


Hi Christoph,

can you give me the complet Backtrace of the error message please ?

regards
Oliver


> hi list
>
> i have a problem with the dropdown rendering of the layers.ini. some
> dropdown entries appear only if the user is logged or has sufficient
> rights. say the user selects one of the additional dropdown entries
> (unlogged user doesn't see this layer). until here everything works fine.
> the problem appears now if the user runs into a session timeout or makes a
> logout. cartoweb throws this error:
> Class : CartoclientException
> Message : unknown layer name: RNP
> Backtrace: ...
> in this case RNP is a restricted layer for the unlogged user.
>
> one solution would be that at the moment of logout the back to map url
> will be extended with ?reset_session. but how can i do that for the
> session timeout? an other solution i imagined is that in case of logout i
> could select by default a public layer of the dropdown list. here i don't
> know how to do that for logout and session timeout.
>
> any other ideas?
>
> might this error be a cartoweb bug?
>
> thanks for help.
> christoph
>
> _______________________________________________
> 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