admin管理员组

文章数量:1291222

It seems like there is an issue with Relationship Filter. Testing on DNN 09.13.04 and 2sxc 19.3.0.

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.

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

Scenario #1 screenshot

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):

Scenario #2 screenshot

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):

Scenario #3 screenshot

Scenario #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):

Scenario #4 screenshot

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):

Scenario #5 screenshot

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

Scenario #6 screenshot

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

So far, looks like the closest working scenario is #6, except this issue.

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!

It seems like there is an issue with Relationship Filter. Testing on DNN 09.13.04 and 2sxc 19.3.0.

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.

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

Scenario #1 screenshot

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):

Scenario #2 screenshot

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):

Scenario #3 screenshot

Scenario #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):

Scenario #4 screenshot

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):

Scenario #5 screenshot

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

Scenario #6 screenshot

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

So far, looks like the closest working scenario is #6, except this issue.

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!

Share Improve this question asked Feb 13 at 19:41 SergiySergiy 11 bronze badge 2
  • I believe you may have spotted a bug, but I'm not sure. But I suggest you open an issue. – iJungleBoy Commented Feb 18 at 14:38
  • Thank you, Daniel. Just submitted bug github/2sic/2sxc/issues/3578 – Sergiy Commented Feb 18 at 17:21
Add a comment  | 

1 Answer 1

Reset to default 0

I think both are supposed to work, but have you tried switch the matching IDs from the Entity.Id to the Entity.Guid to see if that works?

本文标签: dotnetnuke2sxc v1930 VisualQuery multiple filters issueStack Overflow