If a user would changes the theme in the cookie, or after a time you change the themes you provide for the DynaGrid could cause the problem that a theme is saved that doesn't exist anymore. When loading the theme (as in https://github.com/kartik-v/yii2-dynagrid/blob/master/DynaGrid.php#L920) causes an exception.
A solution could be that if you try to load a theme that doesn't exist in your theme config, load the default theme:
If a user would changes the theme in the cookie, or after a time you change the themes you provide for the DynaGrid could cause the problem that a theme is saved that doesn't exist anymore. When loading the theme (as in https://github.com/kartik-v/yii2-dynagrid/blob/master/DynaGrid.php#L920) causes an exception.
A solution could be that if you try to load a theme that doesn't exist in your theme config, load the default theme:
If no defaultTheme is set, this still works.