Closed maxencelaurent closed 1 day ago
Lizmap plugin : 4.3.4
Can you upgrade your plugin ?
Nonetheless, it doesn't work if the ID is of another type, especially uuid, which is pretty common when using postgis layers.
I agree, but you are hitting a few issues on QGIS Server when PK is not integers. We do not recommend using strings as PK, it's written in the plugin when the CFG file is saved, you have some "important" rules in your table, please read the description of this error in the last column, in the tooltip.
My plugin is now up-to-date:
Versions :
There is no "important" warning in the checks
panel.
I guess it's because my PK is of type text
and the plugin only warns about int8
and varchar
PKs.
Here are the corresponding rules in the help about checks
tab:
Invalid varchar field for QGIS Server as primary key
Invalid bigint (integer8) field for QGIS Server as primary key
.(by the way, help about checks
table is editable: Screencast from 2024-06-20 12-31-06.webm)
The description field reads
Primary key should be an integer. If not fixed, expect layer to have some issues with some tools in Lizmap Web Client: zoom to feature, filtering…
I do not experience any zoom-to-feature issue, neither from the data table nor the feature pop-up.
On the other hand, filtering is, indeed, not working. Quoting string IDs when crafting the cFilter
in attributeTable.js
should fix this issue without breaking current behaviour.
Anyway, using integer PKs is not an option for us.
You mentioned QGIS server has some known issues with non-int PKs. I did not find much documentation about that. Do you have any idea where the problems are? I could take some time to investigate this.
Thanks for your detailed bug report.
Quoting string IDs when crafting the cFilter in attributeTable.js should fix this issue without breaking current behaviour.
Can you provide a PR ?
Let me check for these fields.
I'll provide a PR by next days.
Is there any reason format
and DPI
options are disabled in the desktop plugin ? PNG/JPEG exports seem to work fine.
Is there any reason format and DPI options are disabled in the desktop plugin ?
Legacy because there isn't any menu to let the user choose the format when you print an atlas. So the solution would be to allow a single format to be checked for atlas ?
A complete solution would be to display a drop-down menu if many available formats are selected. The current html generation (in FeatureToolbar.js) would require a refactor to implement this. Especially to handle the dynamic field edition.
I will not address this issue in my PR. In a first step, I would simply rely on the default_format
setting.
What is the bug? (in English)
Generating an atlas (
GetPrintAltas
) from a popup works fine if id of features is numeric.Nonetheless, it doesn't work if the ID is of another type, especially uuid, which is pretty common when using postgis layers.
In https://github.com/3liz/lizmap-web-client/blob/283ec7cad7b9dd58d7ebf2cad2aa72027782a952/assets/src/components/FeatureToolbar.js#L648
The id should be escaped in some way.
Not sure if the "$id IN (...)" syntax suggests
this._fig
may be a list of id (eg '1, 2, 3, 4' or [1, 2, 3, 4]) ?It seems there is also some assumptions the ID is always numeric in the atlasprint plugin too.
Steps to reproduce the issue
generate an atlas
which cover this layerprint
iconVersions, safeguards, check summary etc
Versions :
List of safeguards :
* Mode : normal * Allow parent folder : no * Prevent other drive : yes * Prevent PG service : no * Prevent PG Auth DB : yes * Force PG user&pass : yes * Prevent ECW : yes
Check Lizmap plugin
Operating system
Ubuntu 24.04
Browsers
Firefox
Browsers version
Not relevant but Firefox 127
Relevant log output
Server logs