Omeka S - error: We're getting this error when trying to view items in all of our sites

Can anyone point me in direction of resolving this issue? We are on 4.0.1, PHP 8.1

Omeka S encountered an error

Laminas\ServiceManager\Exception\ServiceNotCreatedException
Service with name “dataType” could not be created. Reason: Could not convert database value “college college of e…” to Doctrine Type json

Details:

Doctrine\DBAL\Types\ConversionException: Could not convert database value “college college of e…” to Doctrine Type json in /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/ConversionException.php:36 Stack trace: #0 /var/www/omekas/vendor/doctrine/dbal/lib/Doctrine/DBAL/Types/JsonType.php(63): Doctrine\DBAL\Types\ConversionException::conversionFailed(‘college\ncollege…’, ‘json’) #1 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php(457): Doctrine\DBAL\Types\JsonType->convertToPHPValue(‘college\ncollege…’, Object(Doctrine\DBAL\Platforms\MySqlPlatform)) #2 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(314): Doctrine\ORM\Internal\Hydration\AbstractHydrator->gatherRowData(Array, Array, Array) #3 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php(143): Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateRowData(Array, Array) #4 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php(268): Doctrine\ORM\Internal\Hydration\ObjectHydrator->hydrateAllData() #5 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(1194): Doctrine\ORM\Internal\Hydration\AbstractHydrator->hydrateAll(Object(Doctrine\DBAL\ForwardCompatibility\Result), Object(Doctrine\ORM\Query\ResultSetMapping), Array) #6 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(1135): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1) #7 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(871): Doctrine\ORM\AbstractQuery->execute(NULL, 1) #8 /var/www/omekas/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(171): Doctrine\ORM\AbstractQuery->getResult(1) #9 /var/www/omekas/application/src/Api/Adapter/AbstractEntityAdapter.php(327): Doctrine\ORM\Tools\Pagination\Paginator->getIterator() #10 /var/www/omekas/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request)) #11 /var/www/omekas/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request)) #12 /var/www/omekas/modules/AdvancedSearch/src/Api/ManagerDelegator.php(131): Omeka\Api\Manager->search(‘custom_vocabs’, Array, Array) #13 /var/www/omekas/modules/CustomVocab/Module.php(221): AdvancedSearch\Api\ManagerDelegator->search(‘custom_vocabs’) #14 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): CustomVocab\Module->addDataTypesToValueAnnotatingConfig(Object(Laminas\EventManager\Event)) #15 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\EventManager\Event)) #16 /var/www/omekas/modules/AdvancedResourceTemplate/src/Service/ViewHelper/DataTypeFactory.php(27): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\EventManager\Event)) #17 /var/www/omekas/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(615): AdvancedResourceTemplate\Service\ViewHelper\DataTypeFactory->__invoke(Object(Laminas\ServiceManager\ServiceManager), ‘dataType’, NULL) #18 /var/www/omekas/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(234): Laminas\ServiceManager\ServiceManager->doCreate(‘dataType’) #19 /var/www/omekas/vendor/laminas/laminas-servicemanager/src/AbstractPluginManager.php(171): Laminas\ServiceManager\ServiceManager->get(‘dataType’) #20 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(386): Laminas\ServiceManager\AbstractPluginManager->get(‘dataType’, NULL) #21 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(404): Laminas\View\Renderer\PhpRenderer->plugin(‘dataType’) #22 /var/www/omekas/application/view/common/value-annotation-sidebar.phtml(14): Laminas\View\Renderer\PhpRenderer->__call(‘dataType’, Array) #23 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #24 /var/www/omekas/vendor/laminas/laminas-view/src/Helper/Partial.php(63): Laminas\View\Renderer\PhpRenderer->render(NULL, NULL) #25 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(407): Laminas\View\Helper\Partial->__invoke(‘common/value-an…’) #26 /var/www/omekas/application/view/common/resource-fields.phtml(46): Laminas\View\Renderer\PhpRenderer->__call(‘partial’, Array) #27 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #28 /var/www/omekas/vendor/laminas/laminas-view/src/Helper/Partial.php(63): Laminas\View\Renderer\PhpRenderer->render(NULL, NULL) #29 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(407): Laminas\View\Helper\Partial->__invoke(‘common/resource…’, Array) #30 /var/www/omekas/application/view/omeka/admin/item-set/form.phtml(22): Laminas\View\Renderer\PhpRenderer->__call(‘partial’, Array) #31 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #32 /var/www/omekas/vendor/laminas/laminas-view/src/Helper/Partial.php(63): Laminas\View\Renderer\PhpRenderer->render(NULL, NULL) #33 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(407): Laminas\View\Helper\Partial->__invoke(‘omeka/admin/ite…’, Array) #34 /var/www/omekas/application/view/omeka/admin/item-set/edit.phtml(23): Laminas\View\Renderer\PhpRenderer->__call(‘partial’, Array) #35 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #36 /var/www/omekas/vendor/laminas/laminas-view/src/View.php(194): Laminas\View\Renderer\PhpRenderer->render(NULL) #37 /var/www/omekas/vendor/laminas/laminas-view/src/View.php(222): Laminas\View\View->render(Object(Laminas\View\Model\ViewModel)) #38 /var/www/omekas/vendor/laminas/laminas-view/src/View.php(187): Laminas\View\View->renderChildren(Object(Laminas\View\Model\ViewModel)) #39 /var/www/omekas/vendor/laminas/laminas-mvc/src/View/Http/DefaultRenderingStrategy.php(98): Laminas\View\View->render(Object(Laminas\View\Model\ViewModel)) #40 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Laminas\Mvc\MvcEvent)) #41 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent)) #42 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(360): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\Mvc\MvcEvent)) #43 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(341): Laminas\Mvc\Application->completeRequest(Object(Laminas\Mvc\MvcEvent)) #44 /var/www/omekas/index.php(21): Laminas\Mvc\Application->run() #45 {main} Next Laminas\ServiceManager\Exception\ServiceNotCreatedException: Service with name “dataType” could not be created. Reason: Could not convert database value “college college of e…” to Doctrine Type json in /var/www/omekas/vendor/laminas/laminas-servicemanager/src/ServiceManager.php:622 Stack trace: #0 /var/www/omekas/vendor/laminas/laminas-servicemanager/src/ServiceManager.php(234): Laminas\ServiceManager\ServiceManager->doCreate(‘dataType’) #1 /var/www/omekas/vendor/laminas/laminas-servicemanager/src/AbstractPluginManager.php(171): Laminas\ServiceManager\ServiceManager->get(‘dataType’) #2 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(386): Laminas\ServiceManager\AbstractPluginManager->get(‘dataType’, NULL) #3 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(404): Laminas\View\Renderer\PhpRenderer->plugin(‘dataType’) #4 /var/www/omekas/application/view/common/value-annotation-sidebar.phtml(14): Laminas\View\Renderer\PhpRenderer->__call(‘dataType’, Array) #5 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #6 /var/www/omekas/vendor/laminas/laminas-view/src/Helper/Partial.php(63): Laminas\View\Renderer\PhpRenderer->render(NULL, NULL) #7 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(407): Laminas\View\Helper\Partial->__invoke(‘common/value-an…’) #8 /var/www/omekas/application/view/common/resource-fields.phtml(46): Laminas\View\Renderer\PhpRenderer->__call(‘partial’, Array) #9 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #10 /var/www/omekas/vendor/laminas/laminas-view/src/Helper/Partial.php(63): Laminas\View\Renderer\PhpRenderer->render(NULL, NULL) #11 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(407): Laminas\View\Helper\Partial->__invoke(‘common/resource…’, Array) #12 /var/www/omekas/application/view/omeka/admin/item-set/form.phtml(22): Laminas\View\Renderer\PhpRenderer->__call(‘partial’, Array) #13 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #14 /var/www/omekas/vendor/laminas/laminas-view/src/Helper/Partial.php(63): Laminas\View\Renderer\PhpRenderer->render(NULL, NULL) #15 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(407): Laminas\View\Helper\Partial->__invoke(‘omeka/admin/ite…’, Array) #16 /var/www/omekas/application/view/omeka/admin/item-set/edit.phtml(23): Laminas\View\Renderer\PhpRenderer->__call(‘partial’, Array) #17 /var/www/omekas/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(519): include(‘/var/www/omekas…’) #18 /var/www/omekas/vendor/laminas/laminas-view/src/View.php(194): Laminas\View\Renderer\PhpRenderer->render(NULL) #19 /var/www/omekas/vendor/laminas/laminas-view/src/View.php(222): Laminas\View\View->render(Object(Laminas\View\Model\ViewModel)) #20 /var/www/omekas/vendor/laminas/laminas-view/src/View.php(187): Laminas\View\View->renderChildren(Object(Laminas\View\Model\ViewModel)) #21 /var/www/omekas/vendor/laminas/laminas-mvc/src/View/Http/DefaultRenderingStrategy.php(98): Laminas\View\View->render(Object(Laminas\View\Model\ViewModel)) #22 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(319): Laminas\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Laminas\Mvc\MvcEvent)) #23 /var/www/omekas/vendor/laminas/laminas-eventmanager/src/EventManager.php(171): Laminas\EventManager\EventManager->triggerListeners(Object(Laminas\Mvc\MvcEvent)) #24 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(360): Laminas\EventManager\EventManager->triggerEvent(Object(Laminas\Mvc\MvcEvent)) #25 /var/www/omekas/vendor/laminas/laminas-mvc/src/Application.php(341): Laminas\Mvc\Application->completeRequest(Object(Laminas\Mvc\MvcEvent)) #26 /var/www/omekas/index.php(21): Laminas\Mvc\Application->run() #27 {main}

Omeka S version 4.0.1

System information User manual Support forums

never mind, turned out it was the Custom Vocab Module- deactivated that and things seem to be working.

Can you share which version of Custom Vocab you have, and whether you upgraded it recently?

We have upgraded recently on our development server, which is running Omeka S 4.0.1, PHP 8.0.1 and Custom Vocab 1.7.1.

How did you upgrade the module? Did you replace the existing CustomVocab with the published ZIP file (available here), or did you use some other method, perhaps using EasyAdmin/EasyInstall?

Here the same, with CustomVocab no view of Collection Items, without CustomVocab the items are shown, but opening them, returns an error message because there is no custum_vocab.
BTW installed the CustomVocab with EasyAdmin (files are exactly the same as in zip from Omeka S website)

I won’t be able to help track down this error, but I would note that the readme from EasyAdmin explicitly states that it does not have the capacity to update modules.

It might be that while the file names for the module are the same, they are not being overwritten with the updated versions of the files.

True, EasyAdmin isn’t capable of performing updates of modules, but after you deactivated a Module and deleted the CustomVocab module from the Modules folder, you can reinstall CustomVocab version 1.7.1 with EasyAdmin. Then the files are exactly the same (and I don’t mean just filenames) as the zipfile. Deactivating the CustomVocab module may solve the items viewing problem, but introduces another problem (editing items due to missing custom_vocab)

1 Like

@joep Can you share the specific error or behavior you’re getting? What you’re describing sounds like it’s different than @LisaH’s initial post.

You’re correct. The problem was caused by the Annotate module. By deinstalling the Annotate module everything works again.

Annotate module for v4 is still beta. Which version do you use (3.4.3.8-beta-5 is the last one)?

Update via module EasyAdmin is a in the roadmap of the module. Omeka S should be as simple as Wordpress.

1 Like

@LisaH, there’s a new version of Custom Vocab, version 2.0.1, that should solve the problem you reported here.

1 Like