Jefferson49 / Joomla_plugin_sexypolling_reloaded

Migration of the joomla plugin "Sexy Polling" to joomla 4.x
GNU General Public License v3.0
2 stars 3 forks source link

Joomla exception if deleting an answer in the backend #44

Closed Jefferson49 closed 10 months ago

Jefferson49 commented 1 year ago

Observed with Joomla 4.1.9 and sexy polling v4.1.7rc

If debugging is activated and an answer is deleted in the backend, Joomla throws an exception. If debugging is not activated, the exception is caught somewhere and does not show up.

The exception seems to be related to administrator/components/com_sexypolling/sexypolling.php(45), see stack trace.

Only occurs with Joomla 4

FatalError
Error: Uncaught UnexpectedValueException: Dispatcher not set in Joomla\CMS\MVC\Model\BaseDatabaseModel in /volume1/web/joomla/libraries/vendor/joomla/event/src/DispatcherAwareTrait.php:41
Stack trace:
#0 /volume1/web/joomla/libraries/src/MVC/Model/BaseDatabaseModel.php(343): Joomla\CMS\MVC\Model\BaseDatabaseModel->getDispatcher()
#1 /volume1/web/joomla/libraries/src/MVC/Model/BaseDatabaseModel.php(314): Joomla\CMS\MVC\Model\BaseDatabaseModel->dispatchEvent(Object(Joomla\Event\Event))
#2 /volume1/web/joomla/libraries/src/MVC/Model/AdminModel.php(923): Joomla\CMS\MVC\Model\BaseDatabaseModel->cleanCache()
#3 /volume1/web/joomla/libraries/src/MVC/Controller/AdminController.php(143): Joomla\CMS\MVC\Model\AdminModel->delete(Array)
#4 /volume1/web/joomla/libraries/src/MVC/Controller/BaseController.php(672): Joomla\CMS\MVC\Controller\AdminController->delete()
#5 /volume1/web/joomla/administrator/components/com_sexypolling/sexypolling.php(45): Joomla\CMS\MVC\Controller\BaseController->execute('delete')
#6 /volume1/web/joomla/libraries/src/Dispatcher/LegacyComponentDispatcher.php(71): require_once('/volume1/web/jo...')
#7 /volume1/web/joomla/libraries/src/Dispatcher/LegacyComponentDispatcher.php(73): Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}('/volume1/web/jo...')
#8 /volume1/web/joomla/libraries/src/Component/ComponentHelper.php(355): Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch()
#9 /volume1/web/joomla/libraries/src/Application/AdministratorApplication.php(143): Joomla\CMS\Component\ComponentHelper::renderComponent('com_sexypolling')
#10 /volume1/web/joomla/libraries/src/Application/AdministratorApplication.php(186): Joomla\CMS\Application\AdministratorApplication->dispatch()
#11 /volume1/web/joomla/libraries/src/Application/CMSApplication.php(294): Joomla\CMS\Application\AdministratorApplication->doExecute()
#12 /volume1/web/joomla/administrator/includes/app.php(61): Joomla\CMS\Application\CMSApplication->execute()
#13 /volume1/web/joomla/administrator/index.php(32): require_once('/volume1/web/jo...')
#14 {main}
thrown
Jefferson49 commented 10 months ago

Only occured once. Not reproducible with the latest plugin versions.