[Qgis-user] [QGIS 3.16] Discovered some glitches with styles and attributes table lengthy fields

Jésahel Benoist djes1975 at gmail.com
Fri Oct 8 05:00:39 PDT 2021


I tried on a geopackage and found two things :
- Geopackage also has a field length limit in the attributes table. Maybe
it's well known...?
- The style load and save problem doesn't occur on geopackage but only on
our MSSQL database so far.

The style bug happens in the layer properties panel, in load style from the
database. Restore default style works. From my python code, I think that
the getStyleFromDatabase() has some bug with MSSQL db.

Le jeu. 7 oct. 2021 à 17:37, Jésahel Benoist <djes1975 at gmail.com> a écrit :

> Hello list,
>
> I had some strange behaviour when trying to load a layer's default style
> from my DB in the properties panel, I got the error "Root <qgis> element
> could not be found".
>
> I opened the layers_styles table directly with the attributes table and
> discovered that the record's  styleQML got truncated.
>
> The normal length of this field is 69Kb. Truncated is 32Kb. Impossible to
> add characters in the table. And modifying style always give a truncated
> size around 32Kb.
>
> Strangely, using the style panel to load and save by default works !
>
> By exporting the layer_styles table in a kml file, I see that everything
> is correctly stored in the DB.
>
> Btw, the python code I was using to load default style from db is also
> broken...
>
> So I think there's some bug in one of the default style loading internal
> functions and that the attributes table maximum editable field length is
> around 32Kb.
>
>  Am I missing something?
>
> Regards,
>
> Jésahel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20211008/d0cc0ac8/attachment.html>


More information about the Qgis-user mailing list