Error when doing anything with Easy Admin

The error occurs when trying to install another module through easy admin, or if I try to implement a job. I installed and uninstalled, deactivated/activated.
I also tried to resinstall the log module…

We are running 4.0.4 and easy admin version 3.4.15

Here is the error:
Error
Class “Log\Stdlib\PsrMessage” not found

Details:

Error: Class “Log\Stdlib\PsrMessage” not found in /var/www/omekas/modules/EasyAdmin/src/Controller/CheckAndFixController.php:184 Stack trace: #0 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): EasyAdmin\Controller\CheckAndFixController->indexAction() #1 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent)) #2 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #3 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #4 /var/www/omekas/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response)) #5 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent)) #6 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure)) #7 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent)) #8 /var/www/omekas/index.php(21): Laminas\Mvc\Application->run() #9 {main}

Without any direct familiarity with these modules, I suspect the issue here is that Easy Admin requires Log. If you uninstalled Log, then Easy Admin won’t work. You’d probably have to manually reinstall Log (not using Easy Admin) if that’s the situation.

I tried that. I donwloaded the Log modules zip using wget on our server. Unzipped it in the modules directory.

In OmekaS, I see the module, and it says “Install”. However, when I click install, I get:

The module removed tables "log" from a previous broken install.

Omeka S encountered an error

Doctrine\DBAL\Exception\DriverException
An exception occurred while executing ‘ALTER TABLE log ADD CONSTRAINT FK_8F3F68C57E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id) ON DELETE SET NULL’: SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint ‘omeka_s_temp/FK_8F3F68C57E3C61F9’ to system tables

Details:

PDOException: SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint ‘omeka_s_temp/FK_8F3F68C57E3C61F9’ to system tables in /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:55
Stack trace:
#0 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(55): PDO->exec(‘ALTER TABLE lo...') #1 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1534): Doctrine\DBAL\Driver\PDOConnection->exec('ALTER TABLE lo…’)
#2 /var/www/omekas/modules/Generic/AbstractModule.php(429): Doctrine\DBAL\Connection->executeStatement(‘ALTER TABLE `lo…’)
#3 /var/www/omekas/modules/Generic/AbstractModule.php(112): Generic\AbstractModule->execSqlFromFile(‘/var/www/omekas…’)
#4 /var/www/omekas/application/src/Module/Manager.php(226): Generic\AbstractModule->install(Object(Laminas\ServiceManager\ServiceManager))
#5 /var/www/omekas/application/src/Controller/Admin/ModuleController.php(117): Omeka\Module\Manager->install(Object(Omeka\Module\Module))
#6 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Omeka\Controller\Admin\ModuleController->installAction()
#7 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#8 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#9 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#10 /var/www/omekas/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#11 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#12 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#13 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#14 /var/www/omekas/index.php(21): Laminas\Mvc\Application->run()
#15 {main}

Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint ‘omeka_s_temp/FK_8F3F68C57E3C61F9’ to system tables in /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18
Stack trace:
#0 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(60): Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
#1 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1534): Doctrine\DBAL\Driver\PDOConnection->exec(‘ALTER TABLE lo...') #2 /var/www/omekas/modules/Generic/AbstractModule.php(429): Doctrine\DBAL\Connection->executeStatement('ALTER TABLE lo…’)
#3 /var/www/omekas/modules/Generic/AbstractModule.php(112): Generic\AbstractModule->execSqlFromFile(‘/var/www/omekas…’)
#4 /var/www/omekas/application/src/Module/Manager.php(226): Generic\AbstractModule->install(Object(Laminas\ServiceManager\ServiceManager))
#5 /var/www/omekas/application/src/Controller/Admin/ModuleController.php(117): Omeka\Module\Manager->install(Object(Omeka\Module\Module))
#6 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Omeka\Controller\Admin\ModuleController->installAction()
#7 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#8 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#9 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#10 /var/www/omekas/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#11 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#12 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#13 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#14 /var/www/omekas/index.php(21): Laminas\Mvc\Application->run()
#15 {main}

Next Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE log ADD CONSTRAINT FK_8F3F68C57E3C61F9 FOREIGN KEY (owner_id) REFERENCES user (id) ON DELETE SET NULL’:

SQLSTATE[HY000]: General error: 1823 Failed to add the foreign key constraint ‘omeka_s_temp/FK_8F3F68C57E3C61F9’ to system tables in /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128
Stack trace:
#0 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(182): Doctrine\DBAL\Driver\AbstractMySQLDriver->convertException(‘An exception oc…’, Object(Doctrine\DBAL\Driver\PDO\Exception))
#1 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/DBALException.php(159): Doctrine\DBAL\DBALException::wrapException(Object(Doctrine\DBAL\Driver\PDO\MySQL\Driver), Object(Doctrine\DBAL\Driver\PDO\Exception), ‘An exception oc…’)
#2 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2226): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\MySQL\Driver), Object(Doctrine\DBAL\Driver\PDO\Exception), ‘ALTER TABLE lo...', Array) #3 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1538): Doctrine\DBAL\Connection->handleExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'ALTER TABLE lo…’, Array, Array)
#4 /var/www/omekas/modules/Generic/AbstractModule.php(429): Doctrine\DBAL\Connection->executeStatement(‘ALTER TABLE `lo…’)
#5 /var/www/omekas/modules/Generic/AbstractModule.php(112): Generic\AbstractModule->execSqlFromFile(‘/var/www/omekas…’)
#6 /var/www/omekas/application/src/Module/Manager.php(226): Generic\AbstractModule->install(Object(Laminas\ServiceManager\ServiceManager))
#7 /var/www/omekas/application/src/Controller/Admin/ModuleController.php(117): Omeka\Module\Manager->install(Object(Omeka\Module\Module))
#8 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(71): Omeka\Controller\Admin\ModuleController->installAction()
#9 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
#10 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#11 /var/www/omekas/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(97): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#12 /var/www/omekas/vendor/laminas/laminas-mvc/src/DispatchListener.php(132): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
#13 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
#14 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(179): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
#15 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(325): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
#16 /var/www/omekas/index.php(21): Laminas\Mvc\Application->run()
#17 {main}

Solved this on my own. The module kept saying “Install”, which failed. Since we had used this before, I had a backup of the Log Table, used that. Then went into Module table and added it manually and change the entry to 0 for not active.

Went back into modules in the backend and it showed “Activate” button. Did that, and it worked!