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

overrideFlexformSettingsIfEmpty treats '0' as empty which is incorrect for some fields #1559

Open
github1maxserv opened this issue Aug 30, 2021 · 2 comments
Labels

Comments

@github1maxserv
Copy link

Bug Report

Current Behavior
The flexform has for the option settings.recursive the values [empty], '0', '1', and so on. If this field is included in overrideFlexformSettingsIfEmpty the value '0' will be treated as empty and the TypoScript value will be used. With a TS default of for example "5" it's impossible to set it to '0' in the flexform

Expected behavior/output
For fields where [empty] and '0' have different meaning overrideFlexformSettingsIfEmpty should not treat '0' as empty.

Environment

  • TYPO3 version(s): [10.4.latest]
  • news version: [master]
  • Is your TYPO3 installation set up with Composer (Composer Mode): [yes]
  • OS: [Linux]

Possible Solution
Seems quite complex to have a generic solution. As a workaround we've patched EXT:news to actively check for the 'recursive' field.

Additional context
[none]

@DavidBruchmann
Copy link

DavidBruchmann commented Sep 18, 2021

but you didn't provide / upload your patch, did you?

@github1maxserv
Copy link
Author

Hi David, as I wrote under "Possible solution" we didn't find a generic solution. Because the issue was discovered close to going live and there was just a single field ('recursive') that was problematic a patch was made to treat "0" as not empty just for this field.
It's not a real solution. Perhaps it needs an extra setting to list the fields for which the "zero is interpreted as empty" check can be skipped?

@georgringer georgringer added the Bug label Jun 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants