Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when submitting incident search too fast: Method "getFilter" does not exist and was not trapped in __call() #122

Closed
julianbrost opened this issue Sep 20, 2023 · 2 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@julianbrost
Copy link
Collaborator

Steps to reproduce:

  1. Open incident list (/notifications/incidents)
  2. Type anything into the search bar and submit it very quickly. Quickly means hitting return before the "Search for *x* in: Host Name, Service Name" thing pops up.

This results in the following error/stack trace:

Method "getFilter" does not exist and was not trapped in __call()

#0 /usr/share/icingaweb2/library/Icinga/Web/Controller/ActionController.php(614): Zend_Controller_Action->__call()
#1 /usr/share/icingaweb2/modules/notifications/application/controllers/IncidentsController.php(47): Icinga\Web\Controller\ActionController->__call()
#2 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(516): Icinga\Module\Notifications\Controllers\IncidentsController->indexAction()
#3 /usr/share/icingaweb2/library/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#4 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch()
#5 /usr/share/icingaweb2/library/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch()
#6 /usr/share/icingaweb2/library/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#7 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#8 {main}

Versions: c5310ed in the current icinga/icingaweb2:master container.

@yhabteab
Copy link
Member

That's because the code in controllers was mostly imported from Icinga DB Web without actually checking it all here and results in such errors.

if ($searchBar->hasBeenSubmitted()) {
$filter = $this->getFilter();

Icinga DB Web does have the getFilter() method defined in its own base controller, but IncidentsController and probably some of other controllers of this module directly extend CompatController that don't define the getFilter() method.

@yhabteab yhabteab added the bug Something isn't working label Sep 25, 2023
@raviks789 raviks789 self-assigned this Sep 29, 2023
@raviks789
Copy link
Contributor

This has been fixed in #105.

@raviks789 raviks789 removed their assignment Apr 3, 2024
@nilmerg nilmerg added this to the Beta milestone Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants