Error when removing modules

<%- if @topic_view.topic.tags.present? %>
<%= t 'js.tagging.tags' %>: <%- @topic_view.topic.tags.each do |t| %> <%= t %> <%- end %>
<% end %>

Silverstripe 4.5

Hi All,

Whenever I remove the unclecheese/betterbuttons I get this error below. Happens with other modules too. Is there some sort of clean up I need to do after removing modules now besides the usual dev build?

**Fatal error** : Uncaught InvalidArgumentException: SilverStripe\ORM\DataObject references nonexistent UncleCheese\BetterButtons\Extensions\BetterButtons in 'extensions' in /srv/users/**/apps/**/public/vendor/silverstripe/framework/src/Core/Config/Middleware/ExtensionMiddleware.php:70 Stack trace: #0 /srv/users/**/apps/**/public/vendor/silverstripe/framework/src/Core/Config/Middleware/ExtensionMiddleware.php(41): SilverStripe\Core\Config\Middleware\ExtensionMiddleware->getExtraConfig('SilverStripe\\OR...', Array, 0) #1 /srv/users/**/apps/**/public/vendor/silverstripe/config/src/Middleware/MiddlewareAware.php(56): SilverStripe\Core\Config\Middleware\ExtensionMiddleware->getClassConfig('SilverStripe\\OR...', 0, Object(Closure)) #2 /srv/users/**/apps/**/public/vendor/silverstripe/framework/src/Core/Config/Middleware/InheritanceMiddleware.php(30): SilverStripe\Config\Collections\MemoryConfigCollection->SilverStripe\Config\Middleware\{closure}('SilverStripe\\OR...', 0 in  **/srv/users/**/apps/**/public/vendor/silverstripe/framework/src/Core/Config/Middleware/ExtensionMiddleware.php**  on line  **70**

Nothing specific usually, no. Do you have any other modules installed? (ie. something which may be relying on Better Buttons to work?)

Check your YML files in _config to make sure there are no references.
Did you install / remove with composer? You might try a composer dump-autoload and then a dev/build?flush (the flush is important)
If you don’t have one, try creating a directory in the project root called silverstripe-cache - that will become the place where the project stores its cache files, so you’ll know it’s being cleared properly. (If you do have already, empty it)

This combo worked via ssh. Thanks!

  1. composer remove unclecheese/betterbuttons
  2. composer dump-autoload
  3. vendor/bin/sake dev/build