QField
QField copied to clipboard
features of a point layer disappearing after point coordinates change and synchronization
Describe the issue
Features of a point layer disappearing in qfield after point coordinates change and synchronization. Data still visibile in qgis
Reproduction steps
Steps to reproduce the behavior:
- in qfield select a point feature from a geopackage
- make it modifiable and change its position
- make a syncronization in qfield cloud
Expected behavior
all feature should be there with the updates
Observed behavior
the layer will have 0 feature after synchronization in all syncronized devices but not in qfield
Screenshots and GIFs
[If applicable, add screenshots and GIFs to help explain your problem.]
[Please also attach additional files if a specific project/dataset is useful to investigate the problem.]
Desktop (please complete the following information)
- OS: Debian 11 and Windows 11
- QGIS Version 3.34.3
- QFieldSync Version 4.7.1
Mobile (please complete the following information)
- Device: poco X3 (the same also on Iphone)
- OS: android 12
- QField version: 3.1.9 (f2829b) Qt 6.6.1
Additional information
problem happened in this project: https://app.qfield.cloud/a/uvesco/vespaTO/ in particular those changes cause the problem:
- https://app.qfield.cloud/a/uvesco/vespaTO/changes?id=5ebd6ad8
- https://app.qfield.cloud/a/uvesco/vespaTO/changes?id=b60329d0
- https://app.qfield.cloud/a/uvesco/vespaTO/changes?id=b2db1984 Modifications to the attributes do not affect the layer, creation of new features neither.
Thank you, @uvesco .
One possible cause of the problem is that the GeoPackage schema has been modified. To fix this, you can try to export your layer as a new file. Right-click on the layer and choose "Save as...". Then you can copy the styles from the original layer and apply them to the new one, remember to save the GeoPackage in the same project folder.
Please let me know if this works for you.
Thank you @SeqLaz . I followed your advice but it doesn't work: also with the new geopackage file the problem is the same. I further isolated the unwanted behaviour: if I manually move the point the problem doesn't happen, while if I move the point to the current gps coordinates it damages the geopackage file. It is reproducible applying path by path the single changes.
In the Settings section of your QFieldCloud project, you will see the Packager option. Could you try changing it to Optimize Packager?"
You can find more information about this optimized packager at: https://docs.qfield.org/get-started/tutorials/get-started-qfc/#enhance-your-project-with-the-optimized-packager
sorry, I'm not able to find it (qgis 3.34.3-Prizren).Were should I find it? Qgis 3.34.3-Prizren
This change needs to be implemented in the QFieldCloud web platform of the project.
The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.
Thank you @SeqLaz , I followed your advice and the behaviour changed: after I move (change the position of) a point and I send the local modifications to the cloud, I'm not able to synchronize with the cloud anymore (network error). I can synchronize again without errors only when I delete the point which was moved and send local modifications to the cloud. So it seems something wrong happens with the change of coordinates of points.
Could you try by log out and then log back in?. Afterward, resynchronize the whole project using the Optimize packager. This will package the project in QField using the new packager. Finally, make some changes and push them.
Not sure I followed you advice in the right way: I simplified the project removing some geopackages not used. I moved the point layer along with a related table from a geopackage file to another (building up again the new relationship with the related table). I copied and pasted all the formats, coding again virtual fields. I sent all to the cloud, but It gave me an error because of incomplete metadata. I completed metadata and all was working (almost.not able to display at same time 3 layers with virtual layer to be calculated, but I need only two at the same time). I created one new point. I moved it. It doesn't work: the same behaviour. I'm not able to synchronize with the cloud anymore (network error). I can synchronize again without errors only after I deleted the point which was moved and sent local modifications to the cloud. I also erased all data from qfield app and logged in again to be sure... From where should I log out and in?
I can confirm the issue
Could you try this version?
https://github.com/opengisch/QField/pull/5090
Could you try this version?
#5090
no change in behaviour working with the beta apk posted there (network error until the moved point has been deleted)
The QField project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". If you would like to continue with this issue, please provide any missing information or answer any open questions. If you could resolve the issue yourself meanwhile, please leave a note for future readers with the same problem and close the issue. In case you should have any uncertainty, please leave a comment and we will be happy to help you proceed with this issue. If there is no further activity on this issue, it will be closed in a week.
I noticed that moving the point feature from the menu, not switching its geometry editable, the problem does not arise. So maybe the digitizing feature to move feature geometry (with snap and so on) is not intended to be used to move points. Anyway I have the way to move points without losing database integrity.