Icinga / icinga-notifications-web

Icinga Notifications Web — Manage incidents and who gets notified about them how and when
GNU General Public License v2.0
9 stars 0 forks source link

Events and Incidents Detail View is broken #178

Closed oxzi closed 3 months ago

oxzi commented 3 months ago

I am unable to inspect the detailed view of listed Events and Incidents with an error like the following:

SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "event"
LINE 1: ...d_tag.object_id WHERE sub_object_id_tag_object.id = event.id
^

or

SQLSTATE[42P01]: Undefined table: 7 ERROR: missing FROM-clause entry for table "sub_incident_history"
LINE 1: ...tag.object_id WHERE sub_object_id_tag_object.id = sub_incide...
^

And a stack trace like:

#0 /usr/local/src/ipl-sql/src/Connection.php(402): PDOStatement->execute(Array)
#1 /usr/local/src/ipl-sql/src/Connection.php(418): ipl\Sql\Connection->prepexec(String, Array)
#2 /usr/local/src/ipl-orm/src/Query.php(699): ipl\Sql\Connection->select(Object(ipl\Sql\Select))
#3 /usr/local/src/ipl-orm/src/ResultSet.php(142): ipl\Orm\Query->yieldResults()
#4 [internal function]: ipl\Orm\ResultSet->yieldTraversable(Object(Generator))
#5 /usr/local/src/ipl-orm/src/ResultSet.php(122): Generator->valid()
#6 /usr/local/src/ipl-orm/src/ResultSet.php(114): ipl\Orm\ResultSet->advance()
#7 /usr/share/icingaweb2-modules/notifications/library/Notifications/Model/Objects.php(79): ipl\Orm\ResultSet->rewind()
#8 /usr/share/icingaweb2-modules/notifications/library/Notifications/Widget/ItemList/IncidentListItem.php(55): Icinga\Module\Notifications\Model\Objects->getName()
#9 /usr/local/src/ipl-web/src/Common/BaseListItem.php(109): Icinga\Module\Notifications\Widget\ItemList\IncidentListItem->assembleTitle(Object(ipl\Html\HtmlElement))
#10 /usr/share/icingaweb2-modules/notifications/library/Notifications/Widget/ItemList/IncidentListItem.php(75): ipl\Web\Common\BaseListItem->createTitle()
#11 /usr/local/src/ipl-web/src/Common/BaseListItem.php(74): Icinga\Module\Notifications\Widget\ItemList\IncidentListItem->assembleHeader(Object(ipl\Html\HtmlElement))
#12 /usr/share/icingaweb2-modules/notifications/library/Notifications/Widget/ItemList/IncidentListItem.php(107): ipl\Web\Common\BaseListItem->createHeader()
#13 /usr/local/src/ipl-web/src/Common/BaseListItem.php(83): Icinga\Module\Notifications\Widget\ItemList\IncidentListItem->assembleMain(Object(ipl\Html\HtmlElement))
#14 /usr/local/src/ipl-web/src/Common/BaseListItem.php(142): ipl\Web\Common\BaseListItem->createMain()
#15 /usr/local/src/ipl-html/src/HtmlDocument.php(344): ipl\Web\Common\BaseListItem->assemble()
#16 /usr/local/src/ipl-html/src/HtmlDocument.php(566): ipl\Html\HtmlDocument->ensureAssembled()
#17 /usr/local/src/ipl-html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render()
#18 /usr/local/src/ipl-html/src/BaseHtmlElement.php(297): ipl\Html\HtmlDocument->renderUnwrapped()
#19 /usr/local/src/ipl-html/src/BaseHtmlElement.php(365): ipl\Html\BaseHtmlElement->renderContent()
#20 /usr/local/src/ipl-html/src/HtmlDocument.php(568): ipl\Html\BaseHtmlElement->renderUnwrapped()
#21 /usr/local/src/ipl-html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render()
#22 /usr/local/src/ipl-html/src/BaseHtmlElement.php(297): ipl\Html\HtmlDocument->renderUnwrapped()
#23 /usr/local/src/ipl-html/src/BaseHtmlElement.php(365): ipl\Html\BaseHtmlElement->renderContent()
#24 /usr/local/src/ipl-html/src/HtmlDocument.php(568): ipl\Html\BaseHtmlElement->renderUnwrapped()
#25 /usr/local/src/ipl-html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render()
#26 /usr/local/src/ipl-html/src/BaseHtmlElement.php(297): ipl\Html\HtmlDocument->renderUnwrapped()
#27 /usr/local/src/ipl-html/src/BaseHtmlElement.php(365): ipl\Html\BaseHtmlElement->renderContent()
#28 /usr/local/src/ipl-html/src/HtmlDocument.php(568): ipl\Html\BaseHtmlElement->renderUnwrapped()
#29 /usr/local/src/ipl-html/src/HtmlDocument.php(390): ipl\Html\HtmlDocument->render()
#30 /usr/local/src/ipl-html/src/HtmlDocument.php(568): ipl\Html\HtmlDocument->renderUnwrapped()
#31 /usr/local/src/ipl-web/src/Compat/ViewRenderer.php(56): ipl\Html\HtmlDocument->render()
#32 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/Helper/ViewRenderer.php(970): ipl\Web\Compat\ViewRenderer->render()
#33 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action/HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch()
#34 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(533): Zend_Controller_Action_HelperBroker->notifyPostDispatch()
#35 /icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch(String)
#36 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#37 /icingaweb2/library/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#38 /icingaweb2/library/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#39 /icingaweb2/public/index.php(4): require_once(String)
#40 {main}

2024-04-15-110239_1662x1419_scrot 2024-04-15-110244_1662x1419_scrot

My setup is described in the Icinga Web 2 About page as:

And icinga-notifications{,-web} are both on their current main HEAD.

github.com/Icinga/icinga-notifications-web ‹main› % git show-ref HEAD --hash
110764e6ee666087004c8a8a52920363c7e91403
github.com/Icinga/icinga-notifications ‹main*› % git show-ref HEAD --hash
97e01148ac59d5015bf8014d9c32bed42e0677de
nilmerg commented 3 months ago

Works for me. Are all ipl parts also up to date?

oxzi commented 3 months ago

Okay, I have performed a git pull on all eight locally cloned ipl-* repositories and this did the trick. Sorry for opening the issue.