-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Editing/Modifying Virtual Layers #51777
Comments
Same source issue as #51118 |
Agreed, roya0045. With what I hope is helpful additional information, including the revelation that this behavior will do latent damage to multiple layers which you'll only learn have been essentially deleted the next time you open the project. |
doesn't lose all the layer's properties Fixes qgis#51118 Fixes qgis#51777
doesn't lose all the layer's properties Fixes qgis#51118 Fixes qgis#51777
doesn't lose all the layer's properties Fixes qgis#51118 Fixes qgis#51777
Does not appear to be completely fixed. While attached styles and atlas references are now preserved, a virtual layer which refers to another virtual layer still appears to be forever entangled with that "donor" layer's ID. As such the most severe symptom persists with v3.30. Specifically, even after modifying the "FROM" clause in a "recipient" layer to eliminate any reference to the "donor" layer, removing a "donor" layer (such as a duplicate you might have created to work around the original issue) silently breaks every virtual layer that ever referred to it. As this does not manifest until the project is saved and reopened, restoration from backup is the only recovery option, which of course does not preserve all work from the last session. |
I have similar issues. As my project is complex, I cannot give an explanation by now, I'm just randomly loosing virtual layers on project save/load. |
What is the bug or the crash?
Cannot edit existing virtual layer without triggering multiple problems which would all appear traceable to broken internal references to Layer ID.
First recognized failure relates to virtual layers with multiple associated styles. After edit, only active style remains. All additional style entries simply vanish.
Second failure occurs when editing a virtual layer that is referred to (not imported) by another virtual layer. Doing so appears to work during the active session, but upon saving and reopening project, the subject layer and all referring to it become unusable, only evidenced by vestigial layer legend entries. Right-clicking on legend entry brings up context menu sans "edit virtual layer" option.
Third failure confirms #51118, which breaks atlas layouts using edited virtual layer as coverage layer.
Steps to reproduce the issue
To test theory that implicates Layer ID reference I manually edited only the SQL source of one layer in XML project source file, thus bypassing whatever updating happens in code. This works fine.
Versions
QGIS version
3.28.3-Firenze
QGIS code revision
c12bcb2
Qt version
5.15.3
Python version
3.9.5
GDAL/OGR version
3.6.2
PROJ version
11.1.1
EPSG Registry database version
v10.076 (2022-08-31)
GEOS version
3.11.1-CAPI-1.17.1
SQLite version
3.39.4
PDAL version
2.4.3
PostgreSQL client version
unknown
SpatiaLite version
5.0.1
QWT version
6.1.6
QScintilla2 version
2.13.1
OS version
Windows 10 Version 2009
Active Python plugins
batch_gps_importer
version 1.0.1
kmltools
3.1.27
LayerBoard
1.0.1
NNJoin
3.1.3
numericalDigitize
0.4.7
QuickOSM
2.1.1
quick_map_services
0.19.33
shapetools
3.4.9
SpreadsheetLayers
2.0.1
db_manager
0.1.20
MetaSearch
0.3.6
processing
2.12.99
Supported QGIS version
New profile
Additional context
No response
The text was updated successfully, but these errors were encountered: