Open koenigherford opened 2 years ago
solved by using a new, fresh qgis-profile. Maybe there were conflics with other plugins / former versions
closed too early. Issues are still there with fresh profile
I tried to export the project alternatively with offline editing plugin. Maybe the qfield-sync-plugin is based on this plugin and it helps you to narrow down the reason for the issues.
There were some warnings (only in Oflline editing plugin, but not in QFieldSync-plugin): 1) Message: "Offline Editing Plugin: ERROR: layer not editable"
I use several postgresql-views (which are not edtiable) as value-relation table, a reduced dataset for basemap,... They are necessary in project. So, if this one reason for the issues it would be great, if not editable data can be copied to mobile-project too (but maybe with a read-only setting).
In QFieldSyncSettings there are no options to "Copy" a non-editable-postgresql-view. "Offline editing" is set by default for this layers although it will not work. The other options are "remove from project" and "directly access datasource", but I think both will not be correct to.
2) Message: "Offline Editing Plugin: Field 'myFieldName' from layer myLayerName has been converted from a list to a JSON-formatted string value" I removed all layers with list-field-types but issues are still there - only warnings are gone.
I really would like to use QField - but as my project consists of a lot of layers and complicated settings- it will not be possible to do the offline conversion manually with reasonable efforts. I will be glad if this issue will be fixed.
As described in stackexchange the reason lies in the choosen target file-system of the exported project. If I choose a directory somewere on our servers in our organisation there are several issues with probably randomly affected layers. If local disk "c:" on my windows machine is choosen as export-target (nearly) everything works fine.
As described in [https://gis.stackexchange.com/questions/387591/problem-with-qfieldsync-offline-editing-for-more-than-one-layer] the reason lies in the choosen target file-system of the exported project. If I choose a directory somewere on our servers in our organisation there are several issues with probably randomly affected layers. If local disk "c:" on my windows machine is choosen as export-target (nearly) everything works fine.
Thanks. Another customer described the exactly same behavior.
Could you test if the export works from a server drive using the core plugin " offline editing". See: https://docs.qgis.org/3.22/en/docs/user_manual/plugins/core_plugins/plugins_offline_editing.html
If it doesn't work it would be interresting to know if rightclick on layer > export > to GeoPackage works properly.
Thanks.
I tested it with offline-editing-plugin too. But it failed too (see https://github.com/qgis/QGIS/issues/48940).
Another test: Made an export to server with offline-editing-plugin with observed behaviour as described above. Then rightcklick on layer(s) which were not saved/connected to offline-gpkg: >export to offline-gpkg-file (created in step before). -> It was succesfull to export these layers. (manually and automaticially exported layers were in the same gpkg after that) (Although I think to recognize to have observed the issue last week, that while exporting the layers manually along the layer-tree export of some layers failed unforseeable after some layers too - but I could not reproduce this behaviour now)
Observed an additional bug (https://github.com/qgis/QGIS/issues/48971) with offline-editing-plugin. Setting all non-geometryless layers to "visble" before export did not change the behaviour/issue as described before.
Could you check if you have access rights on the created GPKG:
Excuse my delay...
Comparison of the rights of data.gpkg exported to local hard disc and server
Some layers from Postgresql-utf-8-database
are not exported correctly to offline-project (one layer is empty): Example:
(UTF-8 encoding of database is not recognized both times)
Export-settings:
In some cases (in another project) only few layers are converted to offline-layers, most are still connected to postgresql-database
There are no warnings through export-process
Used QGIS 3.22.2, QFieldSync 4.1.0, Windows
Any ideas ???