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

[BUG] 2sxc v.19.3.0 VisualQuery multiple filters issue #3578

Open
cookdnn opened this issue Feb 18, 2025 · 1 comment
Open

[BUG] 2sxc v.19.3.0 VisualQuery multiple filters issue #3578

cookdnn opened this issue Feb 18, 2025 · 1 comment

Comments

@cookdnn
Copy link

cookdnn commented Feb 18, 2025

Bug Affects...

[x] Content Types or data management
[x] APIs like REST
[x] Platform parts (Dnn)
[x] other / unknown

Current Behavior / Expected Behavior

It seems like there is an issue with Relationship Filter. Testing on DNN 09.13.04 and 2sxc 19.3.0. Based on Stackoverflow conversation:
https://stackoverflow.com/questions/79437555/2sxc-v-19-3-0-visualquery-multiple-filters-issue

There is ContentType “Publications” with 3 fields:

  • Title (string);
  • Theme (relationship to “Themes” ContentType);
  • Language (relationship to “Languages” ContentType).

User may filter by any of those fields or by combinations of them. Values for filtering come from QueryString. Scenarios to reproduce with screenshots are described below:

To Reproduce (Steps, Videos, Screenshots, Apps)

Scenario #1: all 3 filters are defined and filter works fine (screenshot 1):

Image

Scenario #2: Any of Relationship Filters is absent. First filter returns 0 records (what is logically), second 17, third 49 and after AND merging it returns 2 records, which doesn’t look like AND operator (screenshot 2):

Image

Scenario #3: Value Filter [QueryString:FilterTitle] is absent and returns all 221 records. Relationships return 15 and 49 records. Merge by AND operator returns 49 records, what is more than 15 (screenshot 3):

Image

Scenarion #4: Incorrect value for filter, that doesn’t exist in DB (for example FilteTitle), again after merge returns 8 records, however user should see the message “No items with these filter parameters” (screenshot 4):

Image

Scenarion #5: Filter one after one. Again, when Value Filter is absent – it returns all records, when Relationship Filter is absent it returns 0 records (screenshot 5):

Image

Scenario #6: “one after one” using Fallback streams, like described in documentation here:
https://docs.2sxc.org/api/dot-net/ToSic.Eav.DataSources.ValueFilter.html#using-fallback-streams
Also has an issue, because FilterTheme=1587200000 doesn’t exist in database, so use should see the message “No items with these filter parameters”. Instead it takes stream from the fallback (screenshot 6):

Image

One more scenario I tried with StreamFallback, but it doesn’t work as expected, because it takes only the first stream with data.

May you please confirm is it a bug? I would be glad to provide access to the site or to export an app with data for testing.

Thanks in advance!

Your environment

  • 2sxc version(s): 19.03.00 (after upgrading to 19.03.01 issue still exists)
  • Browser: Chrome 132.0.6834.197 | Firefox 135
  • DNN / Oqtane: Dnn 9.13.04
  • Hosting platform: IIS
  • Ui Languages: English | French | German
@iJungleboy
Copy link
Contributor

Based on my code analysis the problem is that we never really tested And/XOR with multiple in-streams, just always with 2.
We'll review...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants