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

isChecked() on null in /usr/share/php/Icinga/Web/Form.php:1231 after update to 2.10 #4718

Closed
mphilipps opened this issue Mar 24, 2022 · 9 comments
Labels
wontfix Deprecated, not supported or not worth any effort

Comments

@mphilipps
Copy link

hi,
Just updated icingaweb only to be suddenly pesented with an darkmode. I then went into My Account and tried changing my theme back to my old one only to be greeted by this error message:

Uncaught Error: Call to a member function isChecked() on null in /usr/share/php/Icinga/Web/Form.php:1231
Stack trace:
#0 /usr/share/icingaweb2/application/forms/PreferenceForm.php(438): Icinga\Web\Form->isSubmitted()
#1 /usr/share/php/Icinga/Web/Form.php(1175): Icinga\Forms\PreferenceForm->isSubmitted()
#2 /usr/share/icingaweb2/application/controllers/AccountController.php(78): Icinga\Web\Form->handleRequest()
#3 /usr/share/icingaweb2/library/vendor/Zend/Controller/Action.php(507): Icinga\Controllers\AccountController->indexAction()
#4 /usr/share/php/Icinga/Web/Controller/Dispatcher.php(76): Zend_Controller_Action->dispatch('indexAction')
#5 /usr/share/icingaweb2/library/vendor/Zend/Controller/Front.php(937): Icinga\Web\Controller\Dispatcher->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#6 /usr/share/php/Icinga/Application/Web.php(304): Zend_Controller_Front->dispatch(Object(Icinga\Web\Request), Object(Icinga\Web\Response))
#7 /usr/share/php/Icinga/Application/webrouter.php(109): Icinga\A

screen02

@mphilipps
Copy link
Author

screen03

@nilmerg
Copy link
Member

nilmerg commented Mar 24, 2022

Hi,

this occurs because you don't have a User Preference Storage Type configured. This is deprecated since v2.9.0. Please configure a database as User Preference Storage Type in the general configuration and this error is gone.

@nilmerg
Copy link
Member

nilmerg commented Mar 24, 2022

Duplicate of #4618

@nilmerg nilmerg marked this as a duplicate of #4618 Mar 24, 2022
@nilmerg nilmerg closed this as completed Mar 24, 2022
@nilmerg nilmerg added the wontfix Deprecated, not supported or not worth any effort label Mar 24, 2022
@mphilipps
Copy link
Author

@nilmerg I have a user preference storage type:

screen04

According to the warning and the changelog you linked ini should still work in 2.10.

@nilmerg
Copy link
Member

nilmerg commented Mar 24, 2022

Yeah, the storage type works fine. For existing configurations, which means existing files can be loaded fine. We just don't plan to fix bugs related to this anymore. Just switch to database and it's fine. There is even a migration script provided to assist you in this. Check the upgrading documentation.

@mphilipps
Copy link
Author

@nilmerg It is not that easy. Currently we write the roles.ini file from our configuration management to ensure that each user has the correct permissions. Can you confirm that roles.ini is not considered a 'User Preference' and is unaffected by the storage type?

@nilmerg
Copy link
Member

nilmerg commented Mar 24, 2022

Yes, a quote from the upgrading documentation:

Note that this only applies to user preferences. Other configurations are still stored in .ini files. (#3770)

@mphilipps
Copy link
Author

@nilmerg I have tested the ini -> db migration on one host and I don't longer encounter the error when changing themes. However I noticed that my menu.ini from preferences/mphilipps is not in the db, but instead loaded from the filesystem. Did I do an incomplete migration? Am I running in some mixed mode?

@nilmerg
Copy link
Member

nilmerg commented Mar 24, 2022

No. Yes. That's still an open issue (#2209)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix Deprecated, not supported or not worth any effort
Projects
None yet
Development

No branches or pull requests

2 participants