Comment module error

Hello,

I installed the Comment module in my Omeka S 3.0, but i doesn’t seem to work properly. Below is the error.

Omeka S encountered an error

TypeError
Return value of Comment\Entity\Comment::getParent() must be an instance of Comment\Entity\Comment, null returned

Details:

TypeError: Return value of Comment\Entity\Comment::getParent() must be an instance of Comment\Entity\Comment, null returned in /mnt/u01/omeka3/modules/Comment/src/Entity/Comment.php:297 Stack trace: #0 /mnt/u01/omeka3/modules/Comment/src/Api/Representation/CommentRepresentation.php(185): Comment\Entity\Comment->getParent() #1 /mnt/u01/omeka3/modules/Comment/view/common/comments-thread.phtml(13): Comment\Api\Representation\CommentRepresentation->parent() #2 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include(’/mnt/u01/omeka3…’) #3 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Helper/Partial.php(61): Laminas\View\Renderer\PhpRenderer->render() #4 /mnt/u01/omeka3/modules/Comment/view/common/comments.phtml(29): Laminas\View\Helper\Partial->__invoke() #5 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include(’/mnt/u01/omeka3…’) #6 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Helper/Partial.php(61): Laminas\View\Renderer\PhpRenderer->render() #7 [internal function]: Laminas\View\Helper\Partial->__invoke() #8 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array() #9 /mnt/u01/omeka3/modules/Comment/src/View/Helper/ShowComments.php(22): Laminas\View\Renderer\PhpRenderer->__call() #10 [internal function]: Comment\View\Helper\ShowComments->__invoke() #11 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array() #12 /mnt/u01/omeka3/modules/Comment/view/common/comment.phtml(10): Laminas\View\Renderer\PhpRenderer->__call() #13 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include(’/mnt/u01/omeka3…’) #14 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Helper/Partial.php(61): Laminas\View\Renderer\PhpRenderer->render() #15 [internal function]: Laminas\View\Helper\Partial->__invoke() #16 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array() #17 /mnt/u01/omeka3/modules/Comment/Module.php(675): Laminas\View\Renderer\PhpRenderer->__call() #18 /mnt/u01/omeka3/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Comment\Module->viewShowAfterPublic() #19 /mnt/u01/omeka3/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners() #20 /mnt/u01/omeka3/application/src/View/Helper/Trigger.php(61): Laminas\EventManager\EventManager->triggerEvent() #21 [internal function]: Omeka\View\Helper\Trigger->__invoke() #22 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(396): call_user_func_array() #23 /mnt/u01/omeka3/themes/foundation/view/omeka/site/item/show.phtml(62): Laminas\View\Renderer\PhpRenderer->__call() #24 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/Renderer/PhpRenderer.php(505): include(’/mnt/u01/omeka3…’) #25 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/View.php(206): Laminas\View\Renderer\PhpRenderer->render() #26 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/View.php(235): Laminas\View\View->render() #27 /mnt/u01/omeka3/vendor/laminas/laminas-view/src/View.php(199): Laminas\View\View->renderChildren() #28 /mnt/u01/omeka3/vendor/laminas/laminas-mvc/src/View/Http/DefaultRenderingStrategy.php(104): Laminas\View\View->render() #29 /mnt/u01/omeka3/vendor/laminas/laminas-eventmanager/src/EventManager.php(321): Laminas\Mvc\View\Http\DefaultRenderingStrategy->render() #30 /mnt/u01/omeka3/vendor/laminas/laminas-eventmanager/src/EventManager.php(170): Laminas\EventManager\EventManager->triggerListeners() #31 /mnt/u01/omeka3/vendor/laminas/laminas-mvc/src/Application.php(366): Laminas\EventManager\EventManager->triggerEvent() #32 /mnt/u01/omeka3/vendor/laminas/laminas-mvc/src/Application.php(347): Laminas\Mvc\Application->completeRequest() #33 /mnt/u01/omeka3/index.php(21): Laminas\Mvc\Application->run() #34 {main}

Hi,
Can you try version 3.3.1.12.1?

Thank you Daniel,
It works

This topic was automatically closed 250 days after the last reply. New replies are no longer allowed.