Form Builder: Deleting a form with a corresponding dashboard breaks the dashboard
Overview
Deleting a Form Builder form that has a corresponding civicrm_dashboard
entry doesn't delete the civicrm_dashboard
entry, resulting in a broken dashboard.
Reproduction steps
- Create a search in Search Kit.
- Create a corresponding Search Form.
- Delete the search. Get the message
Form "%1" will also be deleted because it contains an embedded display from this search.
- Visit your dashboard.
Current behaviour
Drupal WSOD in one instance (D9), dashboard is completely missing in another (D7).
Expected behaviour
Deleting the Form should delete the dashboard entry just as deleting the search deletes the form.