I had a vector layer stored in GeoPackage format with a text field (
lbl_text) that was being used to create labels on a map. After creating 3 points I decided it would be nice to rotate my labels, so I added a rotation field (
lbl_rotation). This prompted multiple notifications stating that the rotation field already existed and that the changes could not be made. I could not save changes to the layer so I cancelled and discarded them.
Despite the rotation field not previously existing and the notifications that creating this field had failed, the rotation field was now present. So I linked it to the data defined rotation option under
Properties > Labels > Rotation. Now my labels could be rotated using
Label Toolbar > Rotate Label.
But when zooming in the point created after this event disappeared. I could not see any reason for this and checked for others having a similar issue. A common solution was to use the geometry checker, so I tried this and found no errors (they're all points after all, what could go wrong?).
Deleting the point and recreating it did not fix the issue. The 4th point created always disappeared when zoomed in, regardless of how many times it was deleted and recreated, or where on the map it was created.
I added a 5th point and it did not have this issue. Eventually I deleted all points and recreated them all. None of them had this issue.
Edit: now all points on this layer exhibit the same problem behaviour, though they didn't when first posting about the issue.
Does anyone have any idea what might have happened and how to fix the problem?
Edit: The following has recovered the project so has been noted to help others, but it does not identify or repair the original problem so I am not marking it as the answer. Note that simply duplicating the affected layer resulted in duplicating the problem too.
To recover from this problem:
Add saved file to mapis checked or re-add the saved layer.
Styles > Copy Style.
Styles > Paste Style.
Points when zoomed out.
The same 3 points when zoomed in. One cannot be seen.