Thomas-Gelf / icingaweb2-module-bem

3 stars 1 forks source link

ErrorException in bem module 0.9.0 #9

Closed bornandre closed 2 years ago

bornandre commented 3 years ago

Hi, we get errors with the bem module: /var/log/messages: user.err icingaweb2[218775]: ErrorException in /usr/share/icingaweb2/modules/bem/application/controllers/ControllerBase.php:10 with message: Class 'dipl\Web\CompatController' not found #0 [internal function]: Icinga\Application\Web->Icinga\Application{closure}() #1 {main}

error message in the browser:

0 [internal function]: Icinga\Application\Web->Icinga\Application{closure}()

1 {main}

help is appreciated..

Thomas-Gelf commented 2 years ago

Hi @bornandre,

dipl was an early prototype for the ipl (Icinga PHP Library), and has been shipped with older Icinga Director versions. For compatibility reasons it is since then available as a dedicated module: dipl. Enable it, and the BEM module should work fine again.

Cheers, Thomas

Thomas-Gelf commented 2 years ago

Note for myself: this should be fixed, the BEM module should use ipl/incubator-components and forget about it's dipl roots.

bornandre commented 2 years ago

it works with module dipl... thx for Help!

bornandre commented 2 years ago

When using icingadb-1.0.0, icingadb-web-1.0.0, and dipl installed, the bem-module (0.9.0) seems to be broken... Uncaught Error: Class 'Icinga\Util\Translator' not found in /usr/share/icingaweb2/modules/dipl/src/dipl/Compat/Translator.php:20 Stack trace:

0 /usr/share/icingaweb2/modules/dipl/src/dipl/Translation/TranslationHelper.php(17): dipl\Compat\Translator->translate('Configured Cell...')

1 /usr/share/icingaweb2/modules/bem/application/controllers/ControllerBase.php(21): dipl\Web\CompatController->translate('Configured Cell...')

2 /usr/share/icingaweb2/modules/bem/application/controllers/NotificationsController.php(11): Icinga\Module\Bem\Controllers\ControllerBase->prepareTabs()

3 /usr/share/icingaweb2/modules/dipl/src/dipl/Web/CompatController.php(144): Icinga\Module\Bem\Controllers\NotificationsController->init()

4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(59): dipl\Web\CompatController->__construct(Object(Icinga\Web\Request), Object(Icinga\Web\Response), Array)

5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Reques (Translator.php:20)

Would be nice if we can get rid of this dipl stuff! Any workaround on this behavior

Thomas-Gelf commented 2 years ago

Hi @bornandre,

sorry for this, someone thought it might be necessary to break things in icinga-php-library - caused issues elsewhere too. As dipl is a very old predecessor of ipl, there is no need to keeping it alive here. I pushed a related modification to the current master, could you please give it a try? Looks good here so far.

Thanks, Thomas

Thomas-Gelf commented 2 years ago

NB: In case it works, you can disable/remove the dipl module

bornandre commented 2 years ago

Cool, works in our environment as well

Thanks André

Am 15.09.2022 um 16:09 schrieb Thomas Gelf @.***>:

NB: In case it works, you can disable/remove the dipl module

— Reply to this email directly, view it on GitHub https://github.com/Thomas-Gelf/icingaweb2-module-bem/issues/9#issuecomment-1248154791, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANGRJCTLR74BY3WFLM7YDXTV6MUYRANCNFSM44HBBKCA. You are receiving this because you were mentioned.