-
-
Notifications
You must be signed in to change notification settings - Fork 829
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
Adding a default filter to discussions breaks a few things #3644
Labels
Comments
can you please give an example use case for such a filter? |
@SychO9 an example would be fof/discussion-language. Depending on the settings, there are cases where the discussions are filtered by the user language. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current Behavior
When adding a filter to the
api/discussions
endpoint that is activated by default (including when on/all
and with default sort), then things like "Hide from All Discussions" inflarum/tags
or the entireflarum/sticky
logic just get ignored because there is an active filter.I suppose the code that has been written makes sense because in most cases when you are on
/all
and have the default sort selected, there are no filters active. But in my use-case there is, so those extensions (tags & sticky) are broken. Maybe there are other things that are broken as well that I am not yet aware of...As a reference, here are the lines of code that are making things break, because they are hard-coded to check if there is an active filter, and if there is the rest of the logic is skipped...
framework/extensions/sticky/src/PinStickiedDiscussionsToTop.php
Line 27 in 05f80b7
framework/extensions/tags/src/Filter/HideHiddenTagsFromAllDiscussionsPage.php
Line 20 in 379c063
Steps to Reproduce
Expected Behavior
Tags and Sticky should work if there is a filter activated by default
Environment
Possible Solution
A possible solution could be to add an extender that allows extensions to blacklist their filters so that they don't get counted when checking if there are active filters.
The text was updated successfully, but these errors were encountered: