3liz / lizmap-web-client

Transfer a QGIS project on a server, Lizmap is providing the web interface to browse it
https://www.lizmap.com
Mozilla Public License 2.0
259 stars 143 forks source link

[Bug]: Unable to print a map with WMS layer from Third Party server #3533

Closed Mavialle closed 1 year ago

Mavialle commented 1 year ago

What is the bug?

When a project contains a WMS layer and Third Party server option is activated in Lizmap plugin for this layer, print is impossible in Lizmap.

Steps to reproduce the issue

  1. Create a new QGIS project (.qgs file)
  2. Open layer Plan IGN v2 from https://wxs.ign.fr/essentiels/geoportail/r/wms
  3. Zoom somewhere, approximately until 1:200000
  4. Open Lizmap plugin and set map extent from map canvas + active print option. Then, go to layer menu, select Plan IGN v2 layer and active select Third Party WMS layers Option + toggled option .
  5. Create a new layout just with map object
  6. Save projet and put it on Lizmap server
  7. Go to the new map on Lizmap and start a print --> nothing happens, print preparation takes forever

If Third Party WMS layers Option is removed in QGIS with Lizmap plugin, print is OK on Lizmap.

Maybe Upgrade Lizmap version can be solve the issue, but I see nothing in release description about something who looks like to this issue..

Versions

Versions :

Check Lizmap plugin

QGIS server version, only if the section above doesn't mention the QGIS Server version

No response

Operating system

Ubuntu

Browsers

Chrome

Browsers version

Version 110.0.5481.178 (Build officiel) (64 bits)

Relevant log output

No response

Mavialle commented 1 year ago

I've found this documentation : https://docs.qgis.org/3.22/en/docs/server_manual/services/wms.html#wms-external

Maybe it's a QGIS server issue, and maybe I just need to add EXTERNAL_WMS parameter, but I don't understand how ?

Mavialle commented 1 year ago

Ok I got it.

QGIS Server seems to not find the layer called by third party server. The browser say that the layer XXXX (= name of layer in wms service) is not found.

So, I duplicated the wms layer : one called by third party server, the other not but named XXXX and not displayed (I put it in a group of layer named "hidden"). And when the GetPrint request is sent, QGIS server use the layer not called by third party server and it's work.

Have a good day !