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] LWC 3.8 : Children attribute table not displayed if the layer has a space ? #4935

Open Alain-LG opened 1 day ago

Alain-LG commented 1 day ago

What is the bug? (in English)

Since I've been using LWC version 3.8, I've lost the child attribute table. I can see the parent's attribute table and the button but when I choose a parent the list of children is not displayed.

It was OK with LWC versions 3.7 and 3.6

Steps to reproduce the issue

  1. I have declared a relation between my table "Suivi marché" and "tronçons"
  2. I have plublished them by WFS
  3. I have added them in the attribute table tab
  4. When I show the parents'attribute table, Its OK.
  5. When I click on a parent, the list of children is not diplayed.

image

Versions, safeguards, check summary etc

Versions :

List of Lizmap Web Client modules :
* saas : 1.7.4 * webdav : 1.1.6
List of safeguards :
* Mode : normal
* Allow parent folder : yes
* Number of parent : 2 folder(s)
* Prevent other drive : yes
* Prevent PG service : yes
* Prevent PG Auth DB : yes
* Force PG user&pass : yes
* Prevent ECW : yes

Check Lizmap plugin

Operating system

Hébergement lizmap

Browsers

Firefox

Browsers version

128.0

Relevant log output

No log output to share.
Gustry commented 1 day ago

Can you please send the URL ?

I do not confirm with tests projects : https://sandbox.lizmap.com/lizmap_3_8/index.php/view/map?repository=tests&project=form_edit_related_child_data

Alain-LG commented 1 day ago

I agree with you, It's OK with a copy of your "cats demo" project on my own instance hosted on your servers. I tried this to know if it was an installation problem or if it comes from my project...

Here is my URL : XXX You can use this login/pwd to connect : xxx/xxx

I don't understad why my childrens attribute table is not displayed whereas I think I have done the same configuration.

I'm currently looking for a solution by changing my foreign key name to lowercase. As a result, I have other small problems due to this field name change. This foreign key is declared as a relationship reference in the QGIS desktop, could it be the cause of this trouble ?

Thanks a lot for your help.

Alain-LG commented 18 hours ago

I found the reason why it wasn't working: my layer names contain spaces.

The solution is therefore to rename the layer in the layer tree and modify the title of these layers in the metadata.

Gustry commented 17 hours ago

The solution is therefore to rename the layer in the layer tree and modify the title of these layers in the metadata.

So there is an issue. But there are a few corner cases, like if your layer has a shortname etc.

Can you replicate the issue on a project ?

Gustry commented 16 hours ago

I'm not sure if the space is the real problem. I just added some test data in #4942 , I couldn't replicate with only the space difference. I haven't debug more for now.