You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current Behavior
I'm adding a news plugin with no category restriction, to show all news from a sysfolder.
In fluid template I built two select fields for categories.
If I select only one category in the first select field, te result is empty. If I select categories in both of the select fields, then the result is not empty. It shows news data with selected categpories due to the category conjunction "and". The reason for that is an empty second category in demand object
If I change categoryConjunction to "or" it works. But thats not what I want. I need categoryConjunction to "and" for the two categories to get the expected result.
Expected behavior/output
Get the news with the selected category in the search result also if only one select field was used to select a category.
Environment
TYPO3 version(s): 12.4.14
news version: 11.4.2
Is your TYPO3 installation set up with Composer (Composer Mode): yes
OS: Local docker environment with PHP 8.2
Possible Solution
Use array_filter to remove empty values
Add this line after line 205 in NewsController in the overwriteDemandObject method.
Bug Report
Current Behavior
I'm adding a news plugin with no category restriction, to show all news from a sysfolder.
In fluid template I built two select fields for categories.
If I select only one category in the first select field, te result is empty. If I select categories in both of the select fields, then the result is not empty. It shows news data with selected categpories due to the category conjunction "and". The reason for that is an empty second category in demand object
If I change categoryConjunction to "or" it works. But thats not what I want. I need categoryConjunction to "and" for the two categories to get the expected result.
Expected behavior/output
Get the news with the selected category in the search result also if only one select field was used to select a category.
Environment
Possible Solution
Use
array_filter
to remove empty valuesAdd this line after line 205 in NewsController in the
overwriteDemandObject
method.Maybe
array_filter
is not the best solution, not sure.The text was updated successfully, but these errors were encountered: