<div dir="ltr"><div>Hi,</div><div><br></div><div>Thanks for taking some time to debug the issue.</div><div>I'm not very able to review this side of the code unfortunately.</div><div>Maybe better to raise the discussion on GitHub ?</div><div><br></div><div>Can you also confirm which Lizmap version and QGIS Server/Desktop ? with patch number included.<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le mar. 4 mai 2021 à 13:25, <<a href="mailto:michal.wloga@envirosolutions.pl">michal.wloga@envirosolutions.pl</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="PL"><div class="gmail-m_-743738870920935651WordSection1"><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US">Hi,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US">I found out that checkbox field always sends to php ‘f’ value because of<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><i><span style="color:rgb(31,73,125)" lang="EN-US">$unchecked = (string) ($this->widgetv2configAttr->UncheckedState === '' ? '<b>f</b>' : $this->widgetv2configAttr->UncheckedState);<u></u><u></u></span></i></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US">From ‘fillCheckboxValues’ function of ‘qgisFormControl.class.php’<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US">Unfortunately commenting it out ends with constant response of “0” instead of ‘f’. Does anyone have an idea where to look for a source of this bug?<u></u><u></u></span></p><div><p class="MsoNormal"><span style="color:rgb(31,73,125)" lang="EN-US">Regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(51,187,90)">EnviroSolutions Sp. z o. o.<br></span><span style="color:rgb(31,73,125)">Michał Włoga<br>tel: +48 607 059 157<br><a href="mailto:coo@envirosolutions.pl" target="_blank">coo@envirosolutions.pl</a><br><a href="http://www.envirosolutions.pl/szkolenia" target="_blank">www.envirosolutions.pl</a></span><span style="color:rgb(0,176,240)"><u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(46,116,181)"><a href="https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych-GUGiK.html" target="_blank"><span style="color:rgb(46,116,181)">Pobieracz Danych GUGiK</span></a></span><span style="color:rgb(31,73,125)"> – laureat nagrody GUGiK na najlepsze wykorzystanie danych i usług GUGiK w 2020 r.<u></u><u></u></span></p></div><p class="MsoNormal"><span style="color:rgb(31,73,125)"><u></u> <u></u></span></p><div><div style="border-color:rgb(225,225,225) currentcolor currentcolor;border-style:solid none none;border-width:1pt medium medium;padding:3pt 0cm 0cm"><p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> Lizmap [mailto:<a href="mailto:lizmap-bounces@lists.osgeo.org" target="_blank">lizmap-bounces@lists.osgeo.org</a>] <b>On Behalf Of </b><a href="mailto:michal.wloga@envirosolutions.pl" target="_blank">michal.wloga@envirosolutions.pl</a><br><b>Sent:</b> Friday, April 30, 2021 11:40 AM<br><b>To:</b> <a href="mailto:lizmap@lists.osgeo.org" target="_blank">lizmap@lists.osgeo.org</a><br><b>Subject:</b> [Lizmap] conditional forms<u></u><u></u></span></p></div></div><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Hi devs,<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal"><span lang="EN-US">I have found some bugs in qgis forms interpretation in Lizmap. It is connected with LWC and lizmap server plugin and can be fixed in different ways so I don’t know where to post an issue.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">Context:<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US">I would like to create a form with visibility based on conditions. In QGIS Desktop everything works correct: via drag and drop forms and groups visibility based on expression eg. >>“boolfield” = true<<<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">The first problem is with checkbox field (Boolean in postgres). JavaScript in LWC sends an request to validate an expression with value “f” if unchecked or “t” if checked. It is forwarded from PHP to lizmap server plugin and it returns False every time because “t” is not recognized as “true”<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US">The second problem is that when there is an expression error (e.g. >>”integerfield” % 2 = 0 << and empty string is passed) QGIS Server (via lizmap plugin) returns “null” but php returns “true” without any notice about backend error.<u></u><u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span lang="EN-US"><u></u> <u></u></span></p><p class="MsoNormal"><span style="color:rgb(31,73,125)">Regards,<u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(51,187,90)" lang="EN-US">EnviroSolutions Sp. z o. o.<br></span><span style="color:rgb(31,73,125)" lang="EN-US">Michał Włoga<br>tel: +48 607 059 157<br></span><span style="color:rgb(31,73,125)"><a href="mailto:coo@envirosolutions.pl" target="_blank"><span lang="EN-US">coo@envirosolutions.pl</span></a></span><span style="color:rgb(31,73,125)" lang="EN-US"><br></span><span style="color:rgb(31,73,125)"><a href="http://www.envirosolutions.pl/szkolenia" target="_blank"><span lang="EN-US">www.envirosolutions.pl</span></a></span><span style="color:rgb(0,176,240)" lang="EN-US"><u></u><u></u></span></p><p class="MsoNormal"><span style="color:rgb(46,116,181)"><a href="https://www.envirosolutions.pl/news/118/129/Wtyczka-QGIS---Pobieracz-Danych-GUGiK.html" target="_blank"><span style="color:rgb(46,116,181)">Pobieracz Danych GUGiK</span></a></span> – laureat nagrody GUGiK na najlepsze wykorzystanie danych i usług GUGiK w 2020 r.<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p></div></div>_______________________________________________<br>
Lizmap mailing list<br>
<a href="mailto:Lizmap@lists.osgeo.org" target="_blank">Lizmap@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/lizmap" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/lizmap</a><br>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p> <span style="font-weight:bold;color:rgb(154,205,50)">Etienne Trimaille</span>
<br>Ingénieur géomaticien <br>
<a href="http://www.3liz.com" style="text-decoration:none;color:rgb(154,205,50)" target="_blank">www.3liz.com</a> <br>
</p><p><span style="font-size:0.8em"> <a href="https://wa.me/0033612931139" target="_blank">WhatsApp uniquement le matin +33 6 12 93 11 39</a><br></span></p><p><span style="font-size:0.8em">
<br>
<b>Siège social</b> <br>
73, allée Kleber <br>
Boulevard de Strasbourg <br>
34000 Montpellier </span>
</p></div></div></div></div></div></div>