Feature request #3572

Handling of symbology load error on project load

Added by Chris Crook over 13 years ago. Updated about 7 years ago.

Category:Project Loading/Saving
Pull Request or Patch supplied:No Resolution:
Easy fix?:No Copied to github as #:13632


This is a proposed patch to change the behaviour of QGis if a layer fails to load because it cannot process the symbology definition in the project file (eg because a renderer plugin is missing).

The current behaviour is to fail to load the layer. The attached patch changes this to instead use a default symbology.

Neither is ideal ... I think it would be better to load a default symbology and report to the user that the original symbology could not be loaded - preferably with a reason why. However that raises a bigger question about how to handle errors when loading the project file.

At the moment if the symbology doesn't load, the layer fails, and the user is presented with the bad layers handler. This allows them to reselect the file used by the layer. However this is really confusing if the file is correct and exists, but the symbology cannot be loaded ... it confused me anyway!

With this patch the layer loads, but the symbology reverts to a default definition - not what the user would expect, but the best that can be done.

symbology_read_error_fix.diff Magnifier (1.11 KB) Chris Crook, 2011-03-08 04:30 PM


#1 Updated by Giovanni Manghi over 12 years ago

  • Target version changed from Version 1.7.0 to Version 1.7.4

#2 Updated by Chris Crook over 12 years ago

  • Pull Request or Patch supplied set to No
  • Assignee deleted (nobody -)

This fix can be improved a little by adding a log message to record the missing renderer - now that log messages are user viewable this is at least a start to making the failure more readily understandable.

#3 Updated by Giovanni Manghi about 12 years ago

  • Target version changed from Version 1.7.4 to Version 2.0.0

#4 Updated by Pirmin Kalberer over 11 years ago

  • Target version changed from Version 2.0.0 to Future Release - Nice to have

#5 Updated by Médéric RIBREUX over 8 years ago

  • Status changed from Open to Feedback

Hello, bug triage...

test done on QGIS 2.13 with Vector field rendere: when the plugin is uninstalled and a project tries to use it, there is an error dialog box telling that the layer is unhandled (saying not why but there is an error message).

Perhaps we should add a more explicit error message telling to the user that a renderer is missing for this layer (and if possible with the name of the renderer).

#6 Updated by Médéric RIBREUX over 8 years ago

  • Status changed from Feedback to Open

#7 Updated by Giovanni Manghi about 7 years ago

  • Easy fix? set to No

Also available in: Atom PDF