Add CompatForm based version of ConfigForm#5480
Open
TheSyscall wants to merge 8 commits intomainfrom
Open
Conversation
TheSyscall
added a commit
to Icinga/icingaweb2-module-pdfexport
that referenced
this pull request
Mar 23, 2026
Now requires Icinga/icingaweb2#5480
Al2Klimov
requested changes
Apr 1, 2026
Member
Al2Klimov
left a comment
There was a problem hiding this comment.
Test
- Install Fedora 42
- Apply https://github.com/Al2Klimov/ansible-icinga-fedora
yum remove icingaweb2-module-monitoring- Downgrade to https://git.icinga.com/packages/icingaweb/-/jobs/856109
tar -C /usr/share/icingaweb2/modules -vxzf ~fedora/test5480.tgzicingacli mod en test5480- Visit /icingaweb2/test5480
- Input something
- Press enter
cat /etc/icingaweb2/modules/test5480/config.ini- Ok
chmod 0440 /etc/icingaweb2/modules/test5480/config.ini- Repeat steps 7-9
- Fails
Seems to work. So far – so good.
| $value = $this->getConfigValue($element->getName()); | ||
|
|
||
| $configSection = $this->config->getSection($section); | ||
| if (empty($value)) { |
Member
There was a problem hiding this comment.
php -r 'echo (int) empty("0");' says "1", so empty() seems not the best idea, does it?
Author
There was a problem hiding this comment.
I have no problems with storing "0" values in the configuration.
Since it could be any type of element here, I don't think there is a reliable way determine if the field should be included or not.
Member
There was a problem hiding this comment.
Currently, your empty() doesn't store "0" values. Is this intentional?
4ab944a to
13eff40
Compare
TheSyscall
added a commit
to Icinga/icingaweb2-module-pdfexport
that referenced
this pull request
Apr 7, 2026
Now requires Icinga/icingaweb2#5480
flourish86
approved these changes
Apr 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
An implementation of an INI based configuration form for CompatForms.
It allows developers to create a configuration form for an INI file and have it automatically populate form elements and store the results back into the specified file or section.
If writing the configuration file fails, an error is displayed alongside the full contents of the file to copy and paste manually by the admin.
This form can optionally be used to delete a section of the configuration file or create a new one.
As suggested here
resolves #5479