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
261 stars 145 forks source link

[Bug]: Lizmap does not displays embed layers when layer name contains accent or a space #3954

Open arno974 opened 1 year ago

arno974 commented 1 year ago

What is the bug?

Hi,

I notice, that embed layers from a master project are not displayed in an other project if the layer has space or accent in his name.

For example in my project QGIS I have two embed layers :

image

But in Lizmap only the one with no accent and/or space is displayed :

image

In the console log I have a message that says :

The WMS layer name Quartiers_de_Saint-Louis is unknown! [LayerTree.js:416:20](webpack://assets/src/modules/config/LayerTree.js)

It used to be fine before and it was working perfectly. I can't tell you when, but in my recent project I can't use embed layers anymore as they tends to have many problems.

Embed layers are very useful when layers are used in different projects. We could rename the data layers in the Lizmap extension. This way, users would have understandable names in the Lizmap Web interface. However, it is not possible to do the same when the user prints a map. The layer names as displayed in QGIS would then appear in the legend.

Have you already noticed these kind of issues ?

Steps to reproduce the issue

  1. add in another QGIS project embed layers from another project (try to have some layers with space and accent in their name)
  2. Add the project in Lizmap
  3. Opening the master project in Lizmap, layers are well displayed
  4. Opening the other project using embed layers, most of them are not available

Versions

Versions :

List of Lizmap Web Client modules :
* Version Lizmap Web Client 3.8 needed
List of safeguards :
* Mode : normal * Allow parent folder : no * Prevent other drive : yes * Prevent PG service : yes * Prevent PG Auth DB : yes * Force PG user&pass : yes * Prevent ECW : yes

Check Lizmap plugin

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

No response

Operating system

Ubuntu 22.04.3 LTS

Browsers

Firefox

Browsers version

Firefox

Relevant log output

No response

arno974 commented 10 months ago

Just an update to specify that this problem still remain in the 3.7 Lizmap version.

Also if I open my browser console, I have a message : The WMS layer nameMy_layeris unknown! [LayerTree.js:413:20])

While the name of the layer in Qgis is My layer (without the underscore).