Fatal error: Uncaught Error: Call to a member function addMessage() on null in /var/www/portoland/vendor/magento/framework/Message/Manager.php:133 Stack trace: #0 /var/www/portoland/vendor/magento/framework/Message/Manager.php(164): Magento\Framework\Message\Manager->addMessage(Object(Magento\Framework\Message\Error), 'AC/DC') #1 /var/www/portoland/app/code/Fox/Seo/Observer/DiscontinuedCategoryCheck.php(51): Magento\Framework\Message\Manager->addError(Object(Magento\Framework\Phrase), 'AC/DC') #2 /var/www/portoland/vendor/magento/framework/Event/Invoker/InvokerDefault.php(73): Fox\Seo\Observer\DiscontinuedCategoryCheck->execute(Object(Magento\Framework\Event\Observer)) #3 /var/www/portoland/vendor/magento/framework/Event/Invoker/InvokerDefault.php(61): Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(Object(Fox\Seo\Observer\DiscontinuedCategoryCheck), Object(Magento\Framework\Event\Observer)) #4 /var/www/portoland/vendor/magento/framework/Event/Manager.php(66): Magento\Framework\Event\Invoker\InvokerDef in /var/www/portoland/vendor/magento/framework/Message/Manager.php on line 133