Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lizmap should call the Project Server Validator from QGIS core #167

Closed
5 tasks done
Gustry opened this issue Nov 8, 2019 · 12 comments
Closed
5 tasks done

Lizmap should call the Project Server Validator from QGIS core #167

Gustry opened this issue Nov 8, 2019 · 12 comments

Comments

@Gustry
Copy link
Member

Gustry commented Nov 8, 2019

  • Make Project Server validator sipified (only in the GUI for now) in QGIS core
  • Add some new checks in this validator:
    • 1. Not possible to have two or many groups with the same name. Group must have different group names.
    • 2. Layer and group starting or ending by a space
    • 3. Project file name or project shortname cannot be used in layer name or group name
  • Lizmap should call this function from qgis.core when saving the CFG file

In the meantime, Lizmap should implement these checks in the plugin itself.

@Gustry
Copy link
Member Author

Gustry commented Jan 15, 2020

@rldhont This can go in the QGIS Server check, no?

@rldhont
Copy link
Contributor

rldhont commented Jan 15, 2020

@Gustry yes, it is.

@Gustry Gustry changed the title Lizmap should warn about same group name Lizmap should call the Project Server Validator from QGIS core Jan 30, 2020
@rldhont
Copy link
Contributor

rldhont commented Jan 30, 2020

the project file name or project shortname cannot be used in layer name or group name

@nboisteault
Copy link
Member

Group name starting or ending by a space too

@Gustry Gustry added the Upstream Issue need some work upstream label Jan 30, 2020
@Gustry
Copy link
Member Author

Gustry commented Jan 30, 2020

Ok, I have added your suggestions in the ticket.

@Gustry
Copy link
Member Author

Gustry commented Mar 28, 2020

PR started 3liz/QGIS#1

@Gustry
Copy link
Member Author

Gustry commented Apr 22, 2020

First part is done in QGIS 3.13 qgis/QGIS#35900

@rldhont I tried but your code was already covering bullet point 1. No? Or a special scenario. Because you were reading all OWS names and check for duplicates within groups already.

For 2, I just checked, I couldn't replicate the issue. I tried a project in lizmap.
or maybe it's a blocker in some situations only ? When all sublayers are grouped together? @nboisteault

I'm trying to be careful when adding these checks upstream in QGIS core because we shouldn't saying the the project is bad if it's working on the QGIS Server side.

@nboisteault
Copy link
Member

@Gustry FYI, discussion we had about 2/ with @mdouchin in IRC the 30/01/2020.

1:15:44 - nboisteault : reluc: kimaidou: concernant les espaces en début et fin de nom pour les couches qui sont supprimés par qgis server mais pas par notre getconfig, qu'est ce qu'on fait ?
11:16:08 - nboisteault : on fait évoluer getProjectConfig ppur qu'il fasse un trim() ?
11:16:40 - kimaidou : nboisteault: on pourrait oui
11:17:12 - kimaidou : c'est mieux de blinder cela au niveau du code
11:18:31 - kimaidou : Le plugin lizmap pourrait prévenir sinon etrimaille lorsqu'il détecte un nom de couche avec des espaces de début ou fin ? NB: QGIS Server fait un trim des noms dans le GetCapabilities
11:18:59 - kimaidou : nboisteault: je crains aussi, car le config est le pivot, donc plutôt peut-être un check dans le plugin pour demander au user de prendre les bonnes résolutions

@Gustry Gustry removed the Upstream Issue need some work upstream label Jun 12, 2020
@Gustry
Copy link
Member Author

Gustry commented Jun 12, 2020

Done in Lizmap plugin : 881057c

@Gustry Gustry closed this as completed Jun 12, 2020
@Gustry
Copy link
Member Author

Gustry commented Jan 29, 2021

Reopening, I want to make this warning more visible to users. 3.16 will be LTR soon

@Gustry Gustry reopened this Jan 29, 2021
@Gustry
Copy link
Member Author

Gustry commented Feb 24, 2021

In the metadata section, the plugin should write if the project was valid when the QGS project was saved.

@Gustry
Copy link
Member Author

Gustry commented Jul 11, 2023

In the metadata section, the plugin should write if the project was valid when the QGS project was saved.

Done

All these warnings should be centralized in a new panel, request #389

@Gustry Gustry closed this as completed Jul 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants