[GeoNode-users] Error when saving style from gxp

Amedeo Fadini amefad at gmail.com
Wed Nov 23 02:34:42 PST 2016


Nope, the layer has correct title and styles from geoserver and it
seems that are correctly updatede..(sometimes I need to manually
delete the styles from administrator panel if I change style name in
geoserver)

The error talks about a None object instead of gs_resource object..
I think that is a matter of permission, cause the GS layer is read
only towards the postgis db (sql view that aggregate data from
different tables)

I see in the log the action  layer.save and updatefields maybe is
fired against the geoserver layer?

amedeo

2016-11-23 8:52 GMT+01:00 Simone Dalmasso <simone.dalmasso at gmail.com>:
> Hi Amedeo,
>
> this is strange, it looks like your geonode layer is missing the title (you
> can check that in the admin panel). I'm wondering if updatelayers could
> create a resource without a style, this would be a bug indeed.
>
> 2016-11-22 9:44 GMT+01:00 Amedeo Fadini <amefad at gmail.com>:
>>
>> Hi everybody,
>>
>> I'm using Geonode 2.4 insatlled via ppa on Ubuntu server.
>> I usually publish my layers in geoserver (most of them are sql views
>> from a Postgis Database that aggregate data from other Mysql db using
>> foreign tables) and so I prepare also the styles in geoserver and then
>> synchronize with  geonode -updatelayers command.
>>
>> I need to add the same layer to a map two or more times, with
>> different styles: when I try to modify the style from the map editor
>> in geoexplorer it raise an error and  the style is not saved.
>> Apache error Log attached below
>>
>> If I clone the style it raise an error "forbidden" (Cannot delete
>> style associated with an other layer) but at the ends the new style is
>> saved.
>>
>> Any clue?
>>
>> thanks
>>
>>
>> Amedeo Fadini
>>
>> ------------------
>>
>>  [Tue Nov 22 09:28:42.948952 2016] [:error] [pid 6020] Internal Server
>> Error: /gs/rest/styles/point.xml
>> [Tue Nov 22 09:28:42.949015 2016] [:error] [pid 6020] Traceback (most
>> recent call last):
>> [Tue Nov 22 09:28:42.949022 2016] [:error] [pid 6020]   File
>> "/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line
>> 112, in get_response
>> [Tue Nov 22 09:28:42.949028 2016] [:error] [pid 6020]     response =
>> wrapped_callback(request, *callback_args, **callback_kwargs)
>> [Tue Nov 22 09:28:42.949032 2016] [:error] [pid 6020]   File
>> "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/views.py",
>> line 339, in geoserver_rest_proxy
>> [Tue Nov 22 09:28:42.949037 2016] [:error] [pid 6020]
>> style_update(request, url)
>> [Tue Nov 22 09:28:42.949043 2016] [:error] [pid 6020]   File
>> "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/helpers.py",
>> line 1520, in style_update
>> [Tue Nov 22 09:28:42.949049 2016] [:error] [pid 6020]     layer.save()
>> [Tue Nov 22 09:28:42.949057 2016] [:error] [pid 6020]   File
>> "/usr/lib/python2.7/dist-packages/polymorphic/polymorphic_model.py",
>> line 90, in save
>> [Tue Nov 22 09:28:42.949063 2016] [:error] [pid 6020]     return
>> super(PolymorphicModel, self).save(*args, **kwargs)
>> [Tue Nov 22 09:28:42.949067 2016] [:error] [pid 6020]   File
>> "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 545,
>> in save
>> [Tue Nov 22 09:28:42.949072 2016] [:error] [pid 6020]
>> force_update=force_update, update_fields=update_fields)
>> [Tue Nov 22 09:28:42.949077 2016] [:error] [pid 6020]   File
>> "/usr/lib/python2.7/dist-packages/django/db/models/base.py", line 569,
>> in save_base
>> [Tue Nov 22 09:28:42.949082 2016] [:error] [pid 6020]
>> update_fields=update_fields)
>> [Tue Nov 22 09:28:42.949088 2016] [:error] [pid 6020]   File
>> "/usr/lib/python2.7/dist-packages/django/dispatch/dispatcher.py", line
>> 185, in send
>> [Tue Nov 22 09:28:42.949101 2016] [:error] [pid 6020]     response =
>> receiver(signal=self, sender=sender, **named)
>> [Tue Nov 22 09:28:42.949107 2016] [:error] [pid 6020]   File
>> "/usr/local/lib/python2.7/dist-packages/geonode/geoserver/signals.py",
>> line 88, in geoserver_pre_save
>> [Tue Nov 22 09:28:42.949112 2016] [:error] [pid 6020]
>> gs_resource.title = instance.title
>> [Tue Nov 22 09:28:42.949117 2016] [:error] [pid 6020] AttributeError:
>> 'NoneType' object has no attribute 'title'
>> _______________________________________________
>> geonode-users mailing list
>> geonode-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/geonode-users
>
>
>
>
> --
> Simone


More information about the geonode-users mailing list