3liz / lizmap-plugin

Lizmap plugin for QGIS, allowing to publish QGIS maps to Lizmap Web Client
https://www.lizmap.com/
GNU General Public License v2.0
61 stars 30 forks source link

[Bug]: Print tool shows even if option is not enabled in LM Plugin #557

Open gioman opened 4 months ago

gioman commented 4 months ago

What is the bug?

LMWC

image

LM Plugin

image

Steps to reproduce the issue

See images above.

Versions, safeguards, check summary etc

LMWC 3.7.3 and QGIS Desktop/Server 3.28.15 LM Plugin 4.2.0

Check Lizmap plugin

Operating system

Ubuntu 22.04

Browsers

Firefox, Chrome

Browsers version

Latest updates

Relevant log output

Nothing relevant.
Gustry commented 4 months ago

Please follow the template , do you have the correct server filled in your table ? The "Print" combobox mustn't be visible anymore if the target version is 3.7.

Is-it a target LWC 3.6 file ?

gioman commented 4 months ago

Is-it a target LWC 3.6 file ?

@Gustry no, is a project for testing 3.7.3 created from scratch, and its CFG too

image

LM plugin is up to date. I understand that now the layouts are manged on a layout basis and not all together, I was just noticing that the checkbox was still there and has no effect. Are you saying that the checkbox should not even show anymore?

Gustry commented 4 months ago

Are you saying that the checkbox should not even show anymore?

Yes, depending of the server selected in the comboxbox. Maybe just the next run of the plugin, the checkbox will not be shown.

I just tried, it's not visible for me on the 3.7 server.

gioman commented 4 months ago

Yes, depending of the server selected in the comboxbox. Maybe just the next run of the plugin, the checkbox will not be shown.

I just tried, it's not visible for me on the 3.7 server.

@Gustry I'm definitely testing on a clean 3.7.3 installation with QGIS Desktop and Server LTR and the latest version of LM plugin: that combobox is always there, even on a new QGIS profile.

Gustry commented 4 months ago

How many servers do you have in your table ? Which versions are they ?

Please give your QGIS desktop logs (the comic strip bubble). You should have some info about the LWC version used for the Lizmap UI (defining which widgets are in light blue, hiding checkbox etc).

Like Saving new value about the LWC target version...

gioman commented 4 months ago

How many servers do you have in your table ? Which versions are they ?

@Gustry just 1. I'm using a clean QGIS profile with LM plugin which points to just one fresh LMWC 3.7.3 installation.

Please give your QGIS desktop logs (the comic strip bubble). You should have some info about the LWC version used for the Lizmap UI (defining which widgets are in light blue, hiding checkbox etc).

Like Saving new value about the LWC target version...

image

That "critical" log message is curious, as you can see I'm running the latest version of the plugin available on qgis.org's public repo.

2024-02-13T19:32:50     CRITICAL    Version checker : running a higher version than on plugins.qgis.org
2024-02-13T19:32:50     INFO    Loading all layouts from the QGIS project :
2024-02-13T19:32:50     INFO    Dialog has been loaded successful, with Lizmap configuration file
2024-02-13T19:32:50     INFO    Reading configuration from dictionary for layer Enquadramento_Ortos2018
2024-02-13T19:32:50     INFO    Reading configuration from dictionary for layer Cont_NUTSIII_CAOP2022
2024-02-13T19:32:50     INFO    Reading configuration from dictionary for layer Google Satellite
2024-02-13T19:32:50     INFO    Reading configuration from dictionary for layer baselayers
2024-02-13T19:32:50     INFO    Reading configuration from dictionary for layer OpenStreetMap
2024-02-13T19:32:50     INFO    Reading configuration from dictionary for layer Bing Satellite
2024-02-13T19:32:52     INFO    Lizmap Web Client target version 3.7, let's try to make the project valid.
2024-02-13T19:32:52     INFO    Existing shortnames detected before in project : Enquadramento_Ortos2018, Cont_NUTSIII_CAOP2022, Google_Satellite, baselayers, OpenStreetMap, Bing_Satellite
2024-02-13T19:32:52     INFO    New shortnames added : 0
2024-02-13T19:32:52     INFO    Existing shortnames detected before in project : Enquadramento_Ortos2018, Cont_NUTSIII_CAOP2022, Google_Satellite, baselayers, OpenStreetMap, Bing_Satellite
2024-02-13T19:32:52     INFO    Setting a project shortname : teste2
2024-02-13T19:32:52     INFO    Project has been detected : VALID according to OGC validation.
2024-02-13T19:32:52     INFO    Project has been detected : VALID according to OGC validation.
2024-02-13T19:32:52     INFO    Writing Lizmap configuration file for LWC version 3.7
2024-02-13T19:32:52     INFO    Skipping key 'noLegendImage' because of max_version.
2024-02-13T19:32:52     INFO    Skipping key 'noLegendImage' because of max_version.
2024-02-13T19:32:52     INFO    Skipping key 'noLegendImage' because of max_version.
2024-02-13T19:32:52     INFO    Skipping key 'noLegendImage' because of max_version.
2024-02-13T19:32:52     INFO    Skipping key 'noLegendImage' because of max_version.
2024-02-13T19:32:52     INFO    Skipping key 'noLegendImage' because of max_version.
2024-02-13T19:32:52     INFO    The Lizmap configuration file has been written to "/***/teste2.qgs.cfg"
2024-02-13T19:32:52     INFO    Getting min/max scales
Gustry commented 4 months ago

That "critical" log message is curious

indeed, but this code is dodgy, I was trying to use the QGIS plugin manager, do not worry about this log. Let's see next release what is the output, CF 1aa2fbe257eb36cbaf9961afe525e2ae54a5eb92

@Gustry just 1. I'm using a clean QGIS profile with LM plugin which points to just one fresh LMWC 3.7.3 installation.

Ok I got it. It's because the signel lwc_version_changed wasn't triggered in your case. I will see what I can do. In the meantime, I made a quick fix : 9bcfeb13b19eea3b29bc642d6bf41445e8d3865c

Gustry commented 6 days ago

Do you still replicate this issue @gioman ? I made a few bugfix about this signal to be emitted when the server has changed.