nystudio107 / craft-autocomplete

Provides Twig template IDE autocomplete of Craft CMS & plugin variables
MIT License
42 stars 4 forks source link

Uninstalling a plugin can cause an exception #5

Closed khalwat closed 3 years ago

khalwat commented 3 years ago

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.

bencroker commented 3 years ago

Good catch, fixed in https://github.com/nystudio107/craft-autocomplete/commit/9b6f0f3fb07da29b0e6c3a0bfa19affb6d11d40e. Feel free to tag a release if you're happy with it.

khalwat commented 3 years ago

Looks perfect, thx