Daniel-KM / Omeka-S-module-Log

Module for Omeka S to monitor all logging messages and background jobs directly in the admin board.
Other
1 stars 0 forks source link

Error: Expected Literal, got 'Log\Entity\Log' #1

Closed pprw closed 5 years ago

pprw commented 5 years ago

Activate this module on Omeka S 2.0.2 generates an error when visiting https://.../admin/job


 Doctrine\ORM\Query\QueryException
[Syntax Error] line 0, col 55: Error: Expected Literal, got 'Log\Entity\Log'

Détails :

Doctrine\ORM\Query\QueryException: SELECT omeka_root FROM Log\Entity\Log omeka_root WHERE Log\Entity\Log.job = :omeka_0 GROUP BY omeka_root.id ORDER BY omeka_root.id ASC in /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/QueryException.php:43
Stack trace:
#0 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(456): Doctrine\ORM\Query\QueryException::dqlError('SELECT omeka_ro...')
#1 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2676): Doctrine\ORM\Query\Parser->syntaxError('Literal')
#2 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2860): Doctrine\ORM\Query\Parser->Literal()
#3 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2798): Doctrine\ORM\Query\Parser->ArithmeticPrimary()
#4 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2766): Doctrine\ORM\Query\Parser->ArithmeticFactor()
#5 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2740): Doctrine\ORM\Query\Parser->ArithmeticTerm()
#6 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2727): Doctrine\ORM\Query\Parser->SimpleArithmeticExpression()
#7 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(3060): Doctrine\ORM\Query\Parser->ArithmeticExpression()
#8 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2591): Doctrine\ORM\Query\Parser->ComparisonExpression()
#9 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2474): Doctrine\ORM\Query\Parser->SimpleConditionalExpression()
#10 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2450): Doctrine\ORM\Query\Parser->ConditionalPrimary()
#11 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2418): Doctrine\ORM\Query\Parser->ConditionalFactor()
#12 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(2393): Doctrine\ORM\Query\Parser->ConditionalTerm()
#13 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(1360): Doctrine\ORM\Query\Parser->ConditionalExpression()
#14 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(880): Doctrine\ORM\Query\Parser->WhereClause()
#15 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(847): Doctrine\ORM\Query\Parser->SelectStatement()
#16 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(260): Doctrine\ORM\Query\Parser->QueryLanguage()
#17 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query/Parser.php(359): Doctrine\ORM\Query\Parser->getAST()
#18 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(283): Doctrine\ORM\Query\Parser->parse()
#19 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Query.php(295): Doctrine\ORM\Query->_parse()
#20 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(967): Doctrine\ORM\Query->_doExecute()
#21 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(922): Doctrine\ORM\AbstractQuery->executeIgnoreQueryCache(NULL, 1)
#22 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/AbstractQuery.php(726): Doctrine\ORM\AbstractQuery->execute(NULL, 1)
#23 /sites/site/www/web_main/vendor/doctrine/orm/lib/Doctrine/ORM/Tools/Pagination/Paginator.php(173): Doctrine\ORM\AbstractQuery->getResult(1)
#24 /sites/site/www/web_main/application/src/Api/Adapter/AbstractEntityAdapter.php(257): Doctrine\ORM\Tools\Pagination\Paginator->getIterator()
#25 /sites/site/www/web_main/application/src/Api/Manager.php(221): Omeka\Api\Adapter\AbstractEntityAdapter->search(Object(Omeka\Api\Request))
#26 /sites/site/www/web_main/application/src/Api/Manager.php(59): Omeka\Api\Manager->execute(Object(Omeka\Api\Request))
#27 /sites/site/www/web_main/application/src/View/Helper/Api.php(36): Omeka\Api\Manager->search('logs', Array)
#28 /sites/site/www/web_main/modules/Log/view/omeka/admin/job/browse.phtml(74): Omeka\View\Helper\Api->search('logs', Array)
#29 /sites/site/www/web_main/vendor/zendframework/zend-view/src/Renderer/PhpRenderer.php(506): include('/sites/erudhilo...')
#30 /sites/site/www/web_main/vendor/zendframework/zend-view/src/View.php(207): Zend\View\Renderer\PhpRenderer->render(NULL)
#31 /sites/site/www/web_main/vendor/zendframework/zend-view/src/View.php(236): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#32 /sites/site/www/web_main/vendor/zendframework/zend-view/src/View.php(200): Zend\View\View->renderChildren(Object(Zend\View\Model\ViewModel))
#33 /sites/site/www/web_main/vendor/zendframework/zend-mvc/src/View/Http/DefaultRenderingStrategy.php(105): Zend\View\View->render(Object(Zend\View\Model\ViewModel))
#34 /sites/site/www/web_main/vendor/zendframework/zend-eventmanager/src/EventManager.php(322): Zend\Mvc\View\Http\DefaultRenderingStrategy->render(Object(Zend\Mvc\MvcEvent))
#35 /sites/site/www/web_main/vendor/zendframework/zend-eventmanager/src/EventManager.php(171): Zend\EventManager\EventManager->triggerListeners(Object(Zend\Mvc\MvcEvent))
#36 /sites/site/www/web_main/vendor/zendframework/zend-mvc/src/Application.php(367): Zend\EventManager\EventManager->triggerEvent(Object(Zend\Mvc\MvcEvent))
#37 /sites/site/www/web_main/vendor/zendframework/zend-mvc/src/Application.php(348): Zend\Mvc\Application->completeRequest(Object(Zend\Mvc\MvcEvent))
#38 /sites/site/www/web_main/index.php(21): Zend\Mvc\Application->run()
#39 {main}
Daniel-KM commented 5 years ago

Yes, the module is not yet updated for Omeka S 2.

symac commented 5 years ago

@pprw if you need a version compatible with omeka-S that seems to work for basic cases you can have a look at #2

@Daniel-KM will maybe think of specific cases that are out of the scope of this quick fix but it might answer your issue.

Daniel-KM commented 5 years ago

Thandks it's fixed in version 2.