3liz / lizmap-plugin

Lizmap plugin for QGIS, allowing to publish QGIS maps to Lizmap Web Client

Home Page:https://www.lizmap.com/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add new blocker rule when the layer or group has a trailing space

r9zzai opened this issue · comments

Description

on a recent commit (4.0.2) following new feature is added
Add new blocker rule when the layer or group has a trailing space

what is the use for that check? WMS/WFS requests are fine for me. I used trailing spaces in layer names many times to show a variant of a layer in another context (another group). So can that check be reverted for layers?

Context

Versions :

  • Lizmap Web Client : 3.6.1
  • Lizmap plugin : 3.18.1
  • QGIS Desktop : 3.30.3
  • QGIS Server : 3.28.13
  • Py-QGIS-Server : 1.8.8
  • QGIS Server plugin atlasprint : 3.3.2
  • QGIS Server plugin lizmap_server : 1.2.2
  • QGIS Server plugin wfsOutputExtension : 1.7.1

The issue is linked to OpenLayers.
When Lizmap Web Client gives a layer name like bakeries, OpenLayers will trim it itself, for it gives back bakeries.

Do you mean you have for instance bakeries in one context and bakeries for the same layer, but in another context ?

Yes, but i use only trailing whitespaces. So if that would not affect OL than would it be be OK to change the trim function from str.strip to str.lstrip?

Sorry, my example was just with the left trim, but OL does both, left and right.
bakeries will be become bakeries when using OpenLayers.

Sorry, but I fail to understand why you are using trailing whitespace in different context. Many tools might trim and it looks like a bad solution.
Why do you add a trailing whitespace on purpose ? Was-it because QGIS desktop was complaining about duplicated layer name ? The fix about that is set a "shortname" in your QGIS server tab of the layer.

yes, it because QGIS desktop was complaining about duplicated layer name.
Ah okay i updated lizmap plugin and new the error (duplicated layer name) is resolved.
Thank you for the hint.