DDEV- Drush command to revert changes to a drupal view before you save

I am sure we have all ran into this, working on a view and forgetting to change the Apply to from "Apply to all views" to "Apply only to this view". Thus adding or worse, deleting fields or configurations across all view displays.

Easy solution if you use Drush. I use DDEV for my local so my command is:

ddev drush eval "\Drupal::keyValueExpirable('tempstore.shared.views')->delete('YOUR_VIEW_ID');"

This reverts the temporary changes. :)

Blog Type: