Closed scottmetoyer closed 2 years ago
This is related to the database. Do you use mysql instead of mariadb?
That's right, we are on MySQL 5.7.33 hosted in AWS RDS. I think RDS has MariaDB support now, I can try switching the database engine and see if that helps.
I updated the module to manage mysql, so it should work with last version (3.6.6.6).
We're seeing the following error in the latest version of IIIF Server (3.6.6.3) and Omeka (3.1.1). Any idea what we're doing wrong?
`Doctrine\DBAL\Exception\DriverException An exception occurred while executing 'SELECT id FROM media media WHERE (item_id = ?) AND (has_thumbnails = 1) AND (media_type IN ("image/jpeg", "image/png", "image/gif", "image/webp")) AND ((source IN ( "thumb.jpg", "thumbnail.jpg", "screenshot.jpg", "vignette.jpg", "miniatura.jpg", "thumb.jpeg", "thumbnail.jpeg", "screenshot.jpeg", "vignette.jpeg", "miniatura.jpeg", "thumb.png", "thumbnail.png", "screenshot.png", "vignette.png", "miniatura.png", "thumb.gif", "thumbnail.gif", "screenshot.gif", "vignette.gif", "miniatura.gif", "thumb.webp", "thumbnail.webp", "screenshot.webp", "vignette.webp", "miniatura.webp" )) OR (source REGEXP "/(?:thumb|thumbnail|screenshot|vignette|miniatura).(?:jpg|jpeg|png|gif|webp)$")) ORDER BY id ASC LIMIT 1' with params [1111]: SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'repetition-operator operand invalid' from regexp
Details:
PDOException: SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'repetition-operator operand invalid' from regexp in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:112 Stack trace:
0 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(112): PDOStatement->execute(NULL)
1 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1292): Doctrine\DBAL\Driver\PDOStatement->execute()
2 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(1452): Doctrine\DBAL\Connection->executeQuery('SELECT id FROM ...', Array)
3 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(296): IiifServer\View\Helper\IiifManifest2->_mainThumbnail(Object(Omeka\Api\Representation\ItemRepresentation), true)
4 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(95): IiifServer\View\Helper\IiifManifest2->buildManifestItem(Object(Omeka\Api\Representation\ItemRepresentation))
5 [internal function]: IiifServer\View\Helper\IiifManifest2->__invoke(Object(Omeka\Api\Representation\ItemRepresentation))
6 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(IiifServer\View\Helper\IiifManifest2), Array)
7 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest.php(59): Laminas\View\Renderer\PhpRenderer->__call('iiifManifest2', Array)
8 /var/app/current/modules/IiifServer/src/Controller/PresentationController.php(110): IiifServer\View\Helper\IiifManifest->__invoke(Object(Omeka\Api\Representation\ItemRepresentation), '2')
9 /var/app/current/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): IiifServer\Controller\PresentationController->manifestAction()
10 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
11 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
12 /var/app/current/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(103): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
13 /var/app/current/vendor/laminas/laminas-mvc/src/DispatchListener.php(139): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
14 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
15 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
16 /var/app/current/vendor/laminas/laminas-mvc/src/Application.php(331): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
17 /var/app/current/index.php(21): Laminas\Mvc\Application->run()
18 {main}
Next Doctrine\DBAL\Driver\PDO\Exception: SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'repetition-operator operand invalid' from regexp in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDO/Exception.php:18 Stack trace:
0 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php(114): Doctrine\DBAL\Driver\PDO\Exception::new(Object(PDOException))
1 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1292): Doctrine\DBAL\Driver\PDOStatement->execute()
2 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(1452): Doctrine\DBAL\Connection->executeQuery('SELECT id FROM ...', Array)
3 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(296): IiifServer\View\Helper\IiifManifest2->_mainThumbnail(Object(Omeka\Api\Representation\ItemRepresentation), true)
4 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(95): IiifServer\View\Helper\IiifManifest2->buildManifestItem(Object(Omeka\Api\Representation\ItemRepresentation))
5 [internal function]: IiifServer\View\Helper\IiifManifest2->__invoke(Object(Omeka\Api\Representation\ItemRepresentation))
6 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(IiifServer\View\Helper\IiifManifest2), Array)
7 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest.php(59): Laminas\View\Renderer\PhpRenderer->__call('iiifManifest2', Array)
8 /var/app/current/modules/IiifServer/src/Controller/PresentationController.php(110): IiifServer\View\Helper\IiifManifest->__invoke(Object(Omeka\Api\Representation\ItemRepresentation), '2')
9 /var/app/current/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): IiifServer\Controller\PresentationController->manifestAction()
10 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
11 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
12 /var/app/current/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(103): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
13 /var/app/current/vendor/laminas/laminas-mvc/src/DispatchListener.php(139): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
14 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
15 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
16 /var/app/current/vendor/laminas/laminas-mvc/src/Application.php(331): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
17 /var/app/current/index.php(21): Laminas\Mvc\Application->run()
18 {main}
Next Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'SELECT id FROM media media WHERE (item_id = ?) AND (has_thumbnails = 1) AND (media_type IN ("image/jpeg", "image/png", "image/gif", "image/webp")) AND ((source IN ( "thumb.jpg", "thumbnail.jpg", "screenshot.jpg", "vignette.jpg", "miniatura.jpg", "thumb.jpeg", "thumbnail.jpeg", "screenshot.jpeg", "vignette.jpeg", "miniatura.jpeg", "thumb.png", "thumbnail.png", "screenshot.png", "vignette.png", "miniatura.png", "thumb.gif", "thumbnail.gif", "screenshot.gif", "vignette.gif", "miniatura.gif", "thumb.webp", "thumbnail.webp", "screenshot.webp", "vignette.webp", "miniatura.webp" )) OR (source REGEXP "/(?:thumb|thumbnail|screenshot|vignette|miniatura).(?:jpg|jpeg|png|gif|webp)$")) ORDER BY id ASC LIMIT 1' with params [1111]:
SQLSTATE[42000]: Syntax error or access violation: 1139 Got error 'repetition-operator operand invalid' from regexp in /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:128 Stack trace:
0 /var/app/current/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/app/current/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/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(2214): Doctrine\DBAL\DBALException::driverExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\MySQL\Driver), Object(Doctrine\DBAL\Driver\PDO\Exception), 'SELECT id FROM ...', Array)
3 /var/app/current/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1301): Doctrine\DBAL\Connection->handleExceptionDuringQuery(Object(Doctrine\DBAL\Driver\PDO\Exception), 'SELECT id FROM ...', Array, Array)
4 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(1452): Doctrine\DBAL\Connection->executeQuery('SELECT id FROM ...', Array)
5 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(296): IiifServer\View\Helper\IiifManifest2->_mainThumbnail(Object(Omeka\Api\Representation\ItemRepresentation), true)
6 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest2.php(95): IiifServer\View\Helper\IiifManifest2->buildManifestItem(Object(Omeka\Api\Representation\ItemRepresentation))
7 [internal function]: IiifServer\View\Helper\IiifManifest2->__invoke(Object(Omeka\Api\Representation\ItemRepresentation))
8 /var/app/current/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array(Object(IiifServer\View\Helper\IiifManifest2), Array)
9 /var/app/current/modules/IiifServer/src/View/Helper/IiifManifest.php(59): Laminas\View\Renderer\PhpRenderer->__call('iiifManifest2', Array)
10 /var/app/current/modules/IiifServer/src/Controller/PresentationController.php(110): IiifServer\View\Helper\IiifManifest->__invoke(Object(Omeka\Api\Representation\ItemRepresentation), '2')
11 /var/app/current/vendor/laminas/laminas-mvc/src/Controller/AbstractActionController.php(77): IiifServer\Controller\PresentationController->manifestAction()
12 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\Controller\AbstractActionController->onDispatch(Object(Laminas\Mvc\MvcEvent))
13 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
14 /var/app/current/vendor/laminas/laminas-mvc/src/Controller/AbstractController.php(103): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
15 /var/app/current/vendor/laminas/laminas-mvc/src/DispatchListener.php(139): Laminas\Mvc\Controller\AbstractController->dispatch(Object(Laminas\Http\PhpEnvironment\Request), Object(Laminas\Http\PhpEnvironment\Response))
16 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\DispatchListener->onDispatch(Object(Laminas\Mvc\MvcEvent))
17 /var/app/current/vendor/laminas/laminas-eventmanager/src/EventManager.php(178): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent), Object(Closure))
18 /var/app/current/vendor/laminas/laminas-mvc/src/Application.php(331): Laminas\EventManager\EventManager->triggerEventUntil(Object(Closure), Object(Laminas\Mvc\MvcEvent))
19 /var/app/current/index.php(21): Laminas\Mvc\Application->run()
20 {main}`