Needs work
Project:
Drupal core
Version:
main
Component:
configuration system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Dec 2016 at 20:13 UTC
Updated:
21 Jul 2025 at 05:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
Anonymous (not verified) commentedFirst of all, @Lendude thank you very much for luxurious quality work over #2468045: When deleting a content type field, users do not realize the related View also is deleted!
As a start for this issue I can offer the port part of my #77. For health reason it already contains the 2468045-86.patch.
Also for reduce c/p problem in
addDependencyListsToForm(), we can bit refactoring this method. Becauseupdate parthas only one different withdelete partand using this check in all cases (update, disable, delete) is not problem.
Comment #3
Anonymous (not verified) commentedWrong patch-refactoring. Sorry!
Comment #7
Anonymous (not verified) commentedI forgot to save 'disable' group. Like
But may be better adding 'disable' entities to 'update' group too? This is more in harmony with
$changed = TRUEand$disable = TRUE:Comment #8
Anonymous (not verified) commentedPatches for #7 variants
Comment #11
Anonymous (not verified) commentedPatches are applied after #2468045-141: When deleting a content type field, users do not realize the related View also is deleted.
Together: View shows in both sections:

Separately: View shows in only disable section:

Comment #12
Anonymous (not verified) commentedFailure tests for variant where
Viewshows inupdateanddisablesections ('together'). And patch without refactoring (just c/p deletes section code) ofaddDependencyListsToForm, if refactoring can be out scope.Patches still are applied only after #2468045-141: When deleting a content type field, users do not realize the related View also is deleted.
Comment #16
xjmI'm very concerned about introducing/generalizing this pattern of support for disabled config in an issue that is not focused on that. While there are a few types of config (like Views) that support a disabled behavior, in general, Drupal 8 has moved away from disabled things because it's a difficult usability pattern and causes all sorts of problems for data integrity and user expectations. So I'm really hesitant to generalize a pattern of disabled config like this at all.
For me, this issue might be wontfix, and we should instead focus on how to actually communicate to users what config is being updated or deleted and (for the specific usecase of Views disabling something) what the module's message about the updated config is.
As stated in #2468045: When deleting a content type field, users do not realize the related View also is deleted, I also think this should have been fixed in that issue. The issue was specifically intended to fix a usability problem, so splitting off the usability component of the fix breaks the UX gate.
Comment #17
alexpottI've created #2872149: All configuration entities can be disabled but many don't actually define what, if anything, that that means for the wider discussion on disabled configuration entities.
Comment #29
vlad.dancer@xjm oh, really? Thank you, but no, we shouldn't!
I lost recently a day of local work while just tried to use views_natural_sort module in my views.
The same as here https://www.drupal.org/project/better_exposed_filters/issues/2992372#com...
And don't say me that I should backup such things!
I'm sorry but I feel myself very upset.
I wish nobody never get into this situation.
Why not just introduce "trash bin" concept without restoring, just to store any config deletions! Let's say "config_deleted" or "config_r__0ab2f8e96b" and so on?
Comment #30
pcrats33 commentedFirst timers are almost 100% not likely to understand the extent that they will lose their views. In my case, I lost the built in Content view that lets me search content from the content administration page. It was a bear to eyeball-copy/create it from deployed backup. My other view had a clone just like it. Still it's a recipe for disaster. Is there a better way to extract/import views? If the infrastructure doesn't play well with disabling views.. can you make a feature to export a single view to json and import it back into any site(with matching keys) from json? Perhaps export all deleted views to a .json file for backup? Or have a generic placeholder field you can replace the deleted field with to keep the view from (i'm assuming) crashing, and not delete the view?
Comment #32
guymandude commentedI just came across this as a very recent user to D9/10. I deleted a field from a Content Type and it broke the Views that were using it. Very annoying to say the last, but more importantly it's a recipe for disaster. I also found I cannot simply edit the broken View and remove the same field from it to fix it quickly. The old fields are not visible on the View edit page any more!
The View was disabled which was helpful to understand what had happened, but can you not configure it such that a reference to the broken field is still visible allowing easy removable from the Views edit page?
Comment #33
ressaI feel with the last three commenters, which confirms my thinking -- giving only an easily missed warning for the deletion of a View, instead of a hard blocker á la when uninstalling Forum module, is a recipe for disaster, and I just posted this in #3112005: View should not be deleted on deletion of content type or uninstall of contrib module, even with a confirmation form:
Also, saw this in #2468045: When deleting a content type field, users do not realize the related View also is deleted: