camptocamp / cgxp

22 stars 22 forks source link

Error printing external WMS #1117

Closed gnerred closed 6 years ago

gnerred commented 7 years ago

When adding manually an external WMS layer, the print returns an error. To reproduce :

1°/ Go to https://map.cartoriviera.ch (or another CGXP interface) 2°/ Add an external WMS from VD or Swisstopo 3°/ Print -> error

ochriste commented 7 years ago

hi Daniel the printv3 doesnt support external WMS layers, yet

gnerred commented 7 years ago

Ping @kalbermattenm

@ybolognini , is it not supposed to ?

sbrunner commented 7 years ago

Yes it suppose to work :-)

gnerred commented 7 years ago

OK thanks ;O)

kalbermattenm commented 7 years ago

Yes, but it isn't as well in version V2.... You can try on http://sitn.ne.ch . I added "Stations bebeco" from the geo.admin.ch WMS service..

I actually never tried it out before today

gnerred commented 7 years ago

That's why it is a CGXP problem

sbrunner commented 7 years ago

He add an attribute on the layer named maxScaleDenominator who is not allowed...

kalbermattenm commented 7 years ago

That's why it is a CGXP problem

Yes, but I just wanted to suggest that this is happening independently of the Mapfish Print version (v2 or v3)

sbrunner commented 7 years ago

@gnerred is it working for you with this change? https://github.com/camptocamp/cgxp/pull/1118/files

gnerred commented 7 years ago

Nope... I have integrated this change in my production (my preprod is down for the moment...), but I still get an error :

org.mapfish.print.MissingPropertyException: Request Json is missing some org.mapfish.print.MissingPropertyException: Request Json is missing some

You can test on https://map.cartoriviera.ch

gnerred commented 7 years ago

More detailed error on json file :

{"done":true,"status":"error","elapsedTime":92,"waitingTime":0,"error":"org.mapfish.print.MissingPropertyException: Request Json is missing some required attributes at: 'spec.attributes.map.layers[0]': \nMissing Properties: \n\n\t int[] tileSize\n\nAll allowed properties are: \n\n\t imageFormat\n\t tileSize\n\t layers\n\t baseURL\n\t styles\n\t rasterStyle\n\t failOnError\n\t version\n\t serverType\n\t customParams\n\t name\n\t mergeableParams\n\t opacity\n\t* useNativeAngle","downloadURL":"/print-main/print/report/fbe39ca8-ab31-4d56-aa57-c71455d5e2c1@0793cc51-ad4b-42bc-ad3d-85140818ebd3"}

sbrunner commented 7 years ago

Thanks for the test, and this time? https://github.com/camptocamp/cgxp/pull/1118/files

gnerred commented 7 years ago

Now it works thanks ;-) !

gnerred commented 7 years ago

But there is a problem with the legend, so I have te reopen issue... Legend is not drawn properly (test on Cartoriviera).