Topic for discussion: what should happen when the user deletes a dynamic property (ControlPropertyItem) while the item is referenced in plugins.
There is currently an error message preventing the Section where the deleted item is referenced from opening
A user fiendly solution would be to find and delete the dependent PropertyValueItems when the ControlPropertyItem is deleted. But this could go across packages so there would be no guarantie that all dependencies were deleted (when deleting a property from the root for example).
Does that happen a lot? During a development phase of the plugin? When a plugin is stable, I would not expect this to happen a lot.
Of course this scenario is potentially huge because it can happen anytime you delete any model dependency. E.g. you remove the whole data entity and some other package depends on it. You are left alone to fix it by yourself in the files. If there would be a tool, then this tool should be able to fix such errors in general. We already have the tool that checks for model consistency. The tool could e.g. offer you to replace the missing links with other links or remove the links.
But – if it happens within your own model (the user can delete a plugin property which has been referenced in a screen), then I would consider this a bug (missing rule). There should be a model rule that prevents deleting a plugin property if the plugin is referenced on a screen/section as removing it would clearly introduce an inconsistency. The user would have to remove the plugin from the screen, remove the property and place the plugin back with a new set of properties. All that without breaking the model.