Content items listing breaks when feature is disabled
Describe the bug
In some usecases, when feature is disabled / not present on project, but its data is present in json data (e.g. via export from local environment), it leads into unusable state of ContentItems.
Content items are for some reason vulnerable to missing:
- admin node definitions
- deployment step definitions
- workflow steps (?)
For example, when you have registration deployment step in deployment plan, but you deactivate Registration feature, it gets broken.
Orchard Core version
2.1.6 this is not a newly introduced bug, it is present in all versions of OC. I just noticed again because of system.text.json change
To Reproduce
- Create deployment plan
- Activate user registration
- Add user registration step do deployment plan
- deactivate user registration
- go to content items
Expected behavior
- I would expect, that even if that may break given functionality - e.g. specific workflow, specific admin menu or specific deployment plan would not work - other features are intact, mainly content items listing.
- currently it seems, that anything that is related document table is breaking content items and deployment plans
Logs and screenshots
We triaged this issue and set the milestone according to the priority we think is appropriate (see the docs on how we triage and prioritize issues).
This indicates when the core team may start working on it. However, if you'd like to contribute, we'd warmly welcome you to do that anytime. See our guide on contributions here.
I think you need to add a list of required features to your recipe, then when the deployment file is imported nothing should break
That will sure help, but there are also other cases, e.g. you have deployment step in deployment plan and you remove custom module.
Then whole content item listing breaks and also deployment plans listing is broken. That means you have to delete it in database, it would be better to remove it in CMS.