Uninstalling a plugin can cause Autocomplete to kick in and attempt to regenerate its files. Problem is, the Twig context will contain references to the stale globals.
Instead, on plugin uninstall, we should just invalidate the caches and let them regenerate on the next request.
Try uninstalling SEOmatic with Craft Autocomplete installed, and you'll see this bug.
Uninstalling a plugin can cause Autocomplete to kick in and attempt to regenerate its files. Problem is, the Twig context will contain references to the stale globals.
Instead, on plugin uninstall, we should just invalidate the caches and let them regenerate on the next request.
Try uninstalling SEOmatic with Craft Autocomplete installed, and you'll see this bug.