icingaweb2-module-director icon indicating copy to clipboard operation
icingaweb2-module-director copied to clipboard

Import source: "Undefined array key "__FORM_CSRF"" while moving a modifier

Open tectumopticum opened this issue 11 months ago • 6 comments

Expected Behavior

Klick in an existing Import source on Tab "Modifiers". Klick on a modifier-entry as if you want to change the entry. On the right column "Prio" klick on the "up"-arrow to move the priority. The entry should move up.

Current Behavior

Instead of moving the entry an exception occurs:

Undefined array key "__FORM_CSRF
#0 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(623): Icinga\Application\ApplicationBootstrap->Icinga\Application\{closure}()  
#1 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/DirectorObjectForm.php(790): Icinga\Module\Director\Web\Form\QuickForm->hasBeenSent()
#2 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(370): Icinga\Module\Director\Web\Form\DirectorObjectForm->beforeSetup()
#3 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(588): Icinga\Module\Director\Web\Form\QuickForm->prepareElements()
#4 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(603): Icinga\Module\Director\Web\Form\QuickForm->setRequest()
#5 /usr/share/icingaweb2/modules/director/library/Director/Web/Form/QuickForm.php(382): Icinga\Module\Director\Web\Form\QuickForm->getRequest()
#6 /usr/share/icingaweb2/modules/director/application/controllers/ImportsourceController.php(324): Icinga\Module\Director\Web\Form\QuickForm->handleRequest()
#7 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Action.php(516): Icinga\Module\Director\Controllers\ImportsourceController->editmodifierAction()
#8 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch()
#9 /usr/share/icinga-php/vendor/vendor/shardj/zf1-future/library/Zend/Controller/Front.php(954): Icinga\Web\Controller\Dispatcher->dispatch()
#10 /usr/share/php/Icinga/Application/Web.php(294): Zend_Controller_Front->dispatch()
#11 /usr/share/php/Icinga/Application/webrouter.php(105): Icinga\Application\Web->dispatch()
#12 /usr/share/icingaweb2/public/index.php(4): require_once(String)
#13 {main}

Steps to Reproduce (for bugs)

  1. Klick in an existing Import source on Tab "Modifiers".
  2. Klick on a modifier-entry as if you want to change the entry.
  3. On the right column "Prio" klick on the "up"-arrow to move the priority.

Your Environment

  • Director version (System - About): 1.11.1
  • Icinga Web 2 version and modules (System - About): 2.12.1, Icinga-php-thirdparty 0.12.1, Icinga-php-library 0.13.1
  • Icinga 2 version (icinga2 --version): 2.14.2
  • Operating System and version: SLES 15 SP5
  • Webserver, PHP versions: Apache/2.4.51, PHP 8.0.30 (cli) (built: Aug 23 2023 12:00:00) ( NTS )

tectumopticum avatar Feb 26 '24 08:02 tectumopticum

ref/NC/809836

carraroj avatar Feb 26 '24 09:02 carraroj

I'd like to add that this doesn't happen if one navigates back (with the link in the top left) first and tries to move modifiers then.

nilmerg avatar Feb 26 '24 09:02 nilmerg

Same happens in sync rules, when you press "Check for changes", then "Trigger Sync"

lazyfrosch avatar Mar 05 '24 14:03 lazyfrosch

Same happens in sync rules, when you press "Check for changes", then "Trigger Sync"

I cannot confirm this. Otherwise we would have an severe issue with critical impact for our production-environment.

tectumopticum avatar Mar 06 '24 07:03 tectumopticum

@lazyfrosch Please check your version of the incubator module, it should be 0.22.0

nilmerg avatar Mar 06 '24 07:03 nilmerg

@nilmerg thanks, just noticed it.

lazyfrosch avatar Mar 06 '24 07:03 lazyfrosch