cgxp icon indicating copy to clipboard operation
cgxp copied to clipboard

CGXP error with GMF 2.2.0rc2

Open gnerred opened this issue 7 years ago • 4 comments

I've installed GMF 2.2.0rc2, but CGXP interface returns now an error :

https://preprod.cartoriviera.ch/theme/cadastre

https://preprod.cartoriviera.ch/preprod/wsgi/_debug/view/1498542454

Can someone please help ASAP ?

gnerred avatar Jun 27 '17 05:06 gnerred

it seems to be a bug, afaik ( @sbrunner can confirm )

external_ogc_server is initialized to None in https://github.com/camptocamp/c2cgeoportal/blob/master/c2cgeoportal/views/entry.py#L120

but the None is not checked in https://github.com/camptocamp/c2cgeoportal/blob/master/c2cgeoportal/views/entry.py#L1250 if hasattr(self, "external_ogc_server"):

so the code tries to get a name property from None and fail

I have made a quick hack in your preprod project to see if adding a "not None" check would work and it seems ok. could you test your project and verify that everything is ok for you? (I think especially about loading various layers of various types)

ochriste avatar Jun 27 '17 06:06 ochriste

Thanks @ochriste now it seems to work. What is this hack ? Can it be easily applied on prod, in order to avoid a problem when installing 2.2 on prod ? Or will it be properly fixed in GMF ?

gnerred avatar Jun 27 '17 07:06 gnerred

I modified live the entry.py so no, it cant be deployed I will make a PR to fix the code of c2cgeoportal and let you know when we can do a new dev release

ochriste avatar Jun 27 '17 07:06 ochriste

Ok thanks I wait your feedback.

gnerred avatar Jun 27 '17 07:06 gnerred