<div dir="ltr">Ah yeah you are right. Though is "instance" which is None no? and Instance should be the one from the GeoNode catalogue "<span style="font-size:12.8px">gs_resource.title = instance.title"</span></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-23 11:34 GMT+01:00 Amedeo Fadini <span dir="ltr"><<a href="mailto:amefad@gmail.com" target="_blank">amefad@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Nope, the layer has correct title and styles from geoserver and it<br>
seems that are correctly updatede..(sometimes I need to manually<br>
delete the styles from administrator panel if I change style name in<br>
geoserver)<br>
<br>
The error talks about a None object instead of gs_resource object..<br>
I think that is a matter of permission, cause the GS layer is read<br>
only towards the postgis db (sql view that aggregate data from<br>
different tables)<br>
<br>
I see in the log the action  layer.save and updatefields maybe is<br>
fired against the geoserver layer?<br>
<br>
amedeo<br>
<br>
2016-11-23 8:52 GMT+01:00 Simone Dalmasso <<a href="mailto:simone.dalmasso@gmail.com">simone.dalmasso@gmail.com</a>>:<br>
> Hi Amedeo,<br>
><br>
> this is strange, it looks like your geonode layer is missing the title (you<br>
> can check that in the admin panel). I'm wondering if updatelayers could<br>
> create a resource without a style, this would be a bug indeed.<br>
><br>
> 2016-11-22 9:44 GMT+01:00 Amedeo Fadini <<a href="mailto:amefad@gmail.com">amefad@gmail.com</a>>:<br>
>><br>
>> Hi everybody,<br>
>><br>
>> I'm using Geonode 2.4 insatlled via ppa on Ubuntu server.<br>
>> I usually publish my layers in geoserver (most of them are sql views<br>
>> from a Postgis Database that aggregate data from other Mysql db using<br>
>> foreign tables) and so I prepare also the styles in geoserver and then<br>
>> synchronize with  geonode -updatelayers command.<br>
>><br>
>> I need to add the same layer to a map two or more times, with<br>
>> different styles: when I try to modify the style from the map editor<br>
>> in geoexplorer it raise an error and  the style is not saved.<br>
>> Apache error Log attached below<br>
>><br>
>> If I clone the style it raise an error "forbidden" (Cannot delete<br>
>> style associated with an other layer) but at the ends the new style is<br>
>> saved.<br>
>><br>
>> Any clue?<br>
>><br>
>> thanks<br>
>><br>
>><br>
>> Amedeo Fadini<br>
>><br>
>> ------------------<br>
>><br>
>>  [Tue Nov 22 09:28:42.948952 2016] [:error] [pid 6020] Internal Server<br>
>> Error: /gs/rest/styles/point.xml<br>
>> [Tue Nov 22 09:28:42.949015 2016] [:error] [pid 6020] Traceback (most<br>
>> recent call last):<br>
>> [Tue Nov 22 09:28:42.949022 2016] [:error] [pid 6020]   File<br>
>> "/usr/lib/python2.7/dist-<wbr>packages/django/core/handlers/<wbr>base.py", line<br>
>> 112, in get_response<br>
>> [Tue Nov 22 09:28:42.949028 2016] [:error] [pid 6020]     response =<br>
>> wrapped_callback(request, *callback_args, **callback_kwargs)<br>
>> [Tue Nov 22 09:28:42.949032 2016] [:error] [pid 6020]   File<br>
>> "/usr/local/lib/python2.7/<wbr>dist-packages/geonode/<wbr>geoserver/views.py",<br>
>> line 339, in geoserver_rest_proxy<br>
>> [Tue Nov 22 09:28:42.949037 2016] [:error] [pid 6020]<br>
>> style_update(request, url)<br>
>> [Tue Nov 22 09:28:42.949043 2016] [:error] [pid 6020]   File<br>
>> "/usr/local/lib/python2.7/<wbr>dist-packages/geonode/<wbr>geoserver/helpers.py",<br>
>> line 1520, in style_update<br>
>> [Tue Nov 22 09:28:42.949049 2016] [:error] [pid 6020]     layer.save()<br>
>> [Tue Nov 22 09:28:42.949057 2016] [:error] [pid 6020]   File<br>
>> "/usr/lib/python2.7/dist-<wbr>packages/polymorphic/<wbr>polymorphic_model.py",<br>
>> line 90, in save<br>
>> [Tue Nov 22 09:28:42.949063 2016] [:error] [pid 6020]     return<br>
>> super(PolymorphicModel, self).save(*args, **kwargs)<br>
>> [Tue Nov 22 09:28:42.949067 2016] [:error] [pid 6020]   File<br>
>> "/usr/lib/python2.7/dist-<wbr>packages/django/db/models/<wbr>base.py", line 545,<br>
>> in save<br>
>> [Tue Nov 22 09:28:42.949072 2016] [:error] [pid 6020]<br>
>> force_update=force_update, update_fields=update_fields)<br>
>> [Tue Nov 22 09:28:42.949077 2016] [:error] [pid 6020]   File<br>
>> "/usr/lib/python2.7/dist-<wbr>packages/django/db/models/<wbr>base.py", line 569,<br>
>> in save_base<br>
>> [Tue Nov 22 09:28:42.949082 2016] [:error] [pid 6020]<br>
>> update_fields=update_fields)<br>
>> [Tue Nov 22 09:28:42.949088 2016] [:error] [pid 6020]   File<br>
>> "/usr/lib/python2.7/dist-<wbr>packages/django/dispatch/<wbr>dispatcher.py", line<br>
>> 185, in send<br>
>> [Tue Nov 22 09:28:42.949101 2016] [:error] [pid 6020]     response =<br>
>> receiver(signal=self, sender=sender, **named)<br>
>> [Tue Nov 22 09:28:42.949107 2016] [:error] [pid 6020]   File<br>
>> "/usr/local/lib/python2.7/<wbr>dist-packages/geonode/<wbr>geoserver/signals.py",<br>
>> line 88, in geoserver_pre_save<br>
>> [Tue Nov 22 09:28:42.949112 2016] [:error] [pid 6020]<br>
>> gs_resource.title = instance.title<br>
>> [Tue Nov 22 09:28:42.949117 2016] [:error] [pid 6020] AttributeError:<br>
>> 'NoneType' object has no attribute 'title'<br>
>> ______________________________<wbr>_________________<br>
>> geonode-users mailing list<br>
>> <a href="mailto:geonode-users@lists.osgeo.org">geonode-users@lists.osgeo.org</a><br>
>> <a href="http://lists.osgeo.org/mailman/listinfo/geonode-users" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/geonode-users</a><br>
><br>
><br>
><br>
<span class="HOEnZb"><font color="#888888">><br>
> --<br>
> Simone<br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Simone </div>
</div>