Pushed changes not applied - incorrect layer ID

Discussed in Pushed changes not applied · opengisch/QField · Discussion #4165 · GitHub

We have a project that fell out of sync. I’m not sure if the original discussion is identical, but I wonder if we have a way to apply the changes still any lose any of the data.

What happened is that there was some sync issue with some data being overwritten. To restore it, we downloaded the geopackage (from the correct point in time) from QField Cloud’s “Files” page, loaded it into the project, set the symbology and layer name, and pushed it back to overwrite the changes.
Unknowingly, this also gave the layer a different layer_id.

After this, any additional changes pushed to this layer were broken because the localLayerId in each change was incorrect.

Is there a way to change the layer_id somehow, without losing the data? Some way to sync all the recorded data to this newer layer?


Imported from GitHub discussion by @idantene on 2023-06-02T10:54:15Z

m-kuhn I’m not sure why this was pushed back as a discussion. It should be escalated, and I believe QField could implement solutions to address this.
For example, a simple way to either assign layer_ids or modify the changes’ JSON before applying it, so it can be applied to the correct layer, etc.


Imported from GitHub comment by @idantene on 2023-06-03T06:33:58Z

Hi idantene
The points raised sound valid.
The issue tracker is strictly for functionality of the qfield mobile app itself, this concerns the cloud usage and configuration.


Imported from GitHub comment by @m-kuhn on 2023-06-03T06:44:43Z

I see, thanks for explaining. Is there a better suited repo to raise this as an issue then?


Imported from GitHub comment by @idantene on 2023-06-03T06:46:23Z

You could try to reach out to support via the question mark chatbot at the bottom right on app.qfield.cloud


Imported from GitHub comment by @m-kuhn on 2023-06-03T06:47:42Z

I have the same problem..


Imported from GitHub comment by @mbjato on 2023-06-27T10:42:11Z

Hi,

I’m afraid having exaclty the same problem. After having an ‘API INTERNAL SERVOR ERROR’, attributes are missing, mixting and some entities not synchronised… The solution to ‘RE-APPLY CHANGES’ didn’t succeed. The only solution to recover a part of my data is tu use backup as described by idantene but it will be problem of layer_id…


Imported from GitHub comment by @GlaDal on 2023-06-30T08:42:24Z