This question is related to the qwc-docker project.
I am trying to make my QGS project layers editable from within the qwc-map-viewer Demo. I've done all the steps listed here and re-checked everything several times.
In addition to those steps I also enabled WFS for the layers in the QGS project.
The postgres user used in the pg_service.conf and qwc-docker/pg_service-write.conf has full rw access to the PostgreSQL database.
However in the end when I run the config generator from the Admin GUI to update the service configuration it doesn't create anything for the "editConfig" property in the volumes/config/default/mapViewerConfig.json file. It remains editConfig: {}
In the Map Viewer when I click the Editing button I simply get the message "No editable layers".
In the docker logs I have no warning or error that would give me some hints as to why I can't make my layers editable.
I don't know what to check anymore, I'm hoping someone already struggled with this and can give me some clues as to how I could debug this.
The host is a Debian 12.7 server, docker 27.2.0, the qwc docker containers are the same versions as those listed in the default docker-compose.yml file in qwc-docker.
My QGIS Desktop project version is 3.38.1.
3 Answers 3
You need to create Resources and Permissions about the project and the layers you want to edit, as mentioned in the documentation (Quick start). Please check if it is the case.
For instance:
- create resource
Map
for QGIS project "my_project" - create resource
Data
for layer "my_layer" which parent resource isMap
"my_project" and check the box "Write" - create permission for resource
Map
"my_project" topublic
role (everyone is allowed to see the project, no need to log in) - create permission for resource
Data
"my_layer" topublic
role (everyone is allowed to edit the layer, no need to log in) - generate configuration and you should see some datasets resources in
volumes/config/default/dataConfig.json
(qwc-data-service) andeditConfig
involumes/config/default/mapViewerConfig.json
(qwc-map-viewer)
-
Yeah I had already done that, only exception I had used the admin role instead of public for both the Map and Data resource. I just tried with public and regenerated the config but no change unfortunately. No resource dataset in dataConfig.json and no editConfig in mapViewerConfig.json.greenkarmic– greenkarmic2024年09月20日 19:44:52 +00:00Commented Sep 20, 2024 at 19:44
-
Please check that resources name match to the technical name of its resource (e.g. WMS layer name). You can check WMS layers name by requesting GetCapabilitiesBenoît Blanc– Benoît Blanc2024年09月24日 11:53:04 +00:00Commented Sep 24, 2024 at 11:53
Changing the version of sourcepole/qwc-config-generator
from latest-2025-lts
(in my case v2025.10-lts
) to v2024.7-lts
addressed the issue.
After that, when generating service configuration in the admin panel (qwc.example.com/qwc_admin/
) such records have finally appeared:
INFO: Generating edit form for layer <layer_name> of project <project_name>
INFO: Wrote <project_name>_<layer_name>.ui
volumes/config/default/permissions.json
and volumes/config/default/mapViewerConfig.json
have been also changed.
To suppress warnings that appear due to poor version compatibility of other microservices (latest-2025-lt
s) with sourcepole/qwc-config-generator:v2024.7-lts
, you can slightly modify volumes/config-in/default/tenantConfig.json
as follows:
Changes in volumes/config-in/default/tenantConfig.json
I had to change several versions before I found a working one. It seems that starting with sourcepole/qwc-config-generator:v2025.0-lts
, some bug has appeared that directly affects the generation of JSON configurations using the qwc-config-service
.
I had just the same issue. And it's now fixed in the latest-2025-lts.
Just execute docker composer pull
and you'll be OK.
qgis/qwc2 issue "Can't make a layer editable #397" https://github.com/qgis/qwc2/issues/397