-
Notifications
You must be signed in to change notification settings - Fork 359
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
Fix bug: incorrect author link hidden filter in combined search #3557
Fix bug: incorrect author link hidden filter in combined search #3557
Conversation
Update: I haven't found a fix yet, but I have found a workaround. I've updated the test to try different combinations of AJAX settings for the columns. The test passes if both columns (or just the left column) are |
…mbined-hidden-filter-author-bug
At the moment the best solution I can think of is to allow record drivers to have access to Params of current search (the active search or the one from the sid parameter) so that they'd have access to actual current filters. Maybe this could be done in a back-compatible manner so that it falls back to search memory if Params is not there. In the long run this would simplify getting hidden filters. |
Which record driver method(s) would need access to the Params? I'm currently working to decouple record drivers from database logic, because I think it would be better if they were purely data models instead of containing so much business logic. Adding Params access seems like it might be a step counter to that principle. Is it possible that we need a helper class that takes a record driver and applies Params-related logic, rather than embedding this in the record driver itself? |
@demiankatz You're right about that. As discussed elsewhere, storing the search ID with the record driver would be a better way, and it would be possible to implement in a back-compatible way. |
Unfortunately, I think it's getting a bit late to finish this in time for 9.1 or 10.0, so I'm pushing this milestone to 10.0.1. |
(If a miracle occurs and this gets done early, I'd of course still be happy to merge it... but I just don't think that's likely). |
@EreMaijala, as discussed on today's Community Call, I went ahead and added a mechanism to store the search ID in the record driver. Since we're aiming to include this fix in a point release, I opted for the simplest approach -- using the existing setExtraDetails method instead of building new purpose-built getters/setters for search IDs. I'm open to revisiting this decision now or in the future, but this seemed like a very unintrusive approach and thus a viable starting point. Please let me know what you think, and if you'd like me to attempt any further work on this. (This part was considerably less complicated than I had anticipated). |
@demiankatz I finally got around to fixing this. Should work with the latest commit, but I can't ask for review from you in your own PR. |
Thanks, @EreMaijala, looks good to me. I'm running tests and expect them to pass. Do you mind approving this so I can merge it (assuming nothing unexpected occurs)? |
(Tests are passing, as expected). |
This PR is intended to fix a bug where hidden filters from the last combined search column get inappropriately applied to author links in earlier columns.
TODO