[Cartoweb-users] 3 questions about Views

Alexandre Saunier alexandre.saunier at camptocamp.com
Thu Aug 25 07:34:54 EDT 2005


frequens wrote:
> 1. When trying to load a view from URL like
> http://www.xxxx.com/demo.php?view=3 the view does not load (I get the
> full extent map) and the following notices and warnings appear in the
> server log for one try:
> PHP Notice:  Trying to get property of non-object in
> /home/cartoweb3/client/Views.php on line 225

First, views use the session content to store the plugin state. Thus it
cannot correctly work if one of the plugins to save has no session 
storage capability. Make sure that all your "viewable" plugins implement 
the "Sessionable" interface.

Anyway, the notice message seems to indicate that the CW3 session object
was not correctly passed to the views managing system (?). Try resetting 
the session (reset_session button or ?reset_session in URL) and reload 
view. If the trouble persists (only with that view id???) try temporarly 
adding the following line :
in client/Cartoclient.php around l.650 and check if your session is 
actually a ClientSession object containing a PluginStorage array...

> 2. The client.ini reads: viewablePlugins = location, layers, query, outline
> While location, layers and outline are successfully restored when
> loading my views, the query (i.e. selected features) do not appear
> marked nor their attributes shown?

I would not be surprised that
your "query" plugin, even though it does implement Sessionable, does not
save any session stuff. It's certainly because you  have not made
queries persistent by setting "persistentQueries" to "true" in your

> 3. Is Internationalization supported also for Views and if yes where
> should their names appear to be translated.

The answer is no and the raison is quite simple: views are user-made
content and thus in most cases it's difficult to know in advance what
would be the name translations. However you may override your templates
to insert {t} tags in the views list selector or else modify the views
plugin and config (viewMetas in client.ini) to enable the user to input
the views names in several languages...


More information about the Cartoweb-users mailing list