Problem/Motivation
I have two facet block displays within a single view and need to alter the query of only one of them. This is difficult to do since the generated "search id" is the same for both displays.
Proposed resolution
The machine name of the display should be used when generating the "search id" to help uniquely identify each facet block.
Remaining tasks
Reviews needed.
API changes
Changes how SearchAPIQuery's are identified.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | 1959506-7--views_facets_block_search_id.patch | 1.43 KB | drunken monkey |
| #2 | search_api-facet-block-search-id-1959506-2.patch | 3.57 KB | jantoine |
| #1 | search_api-facet-block-search-id-1959506-1.patch | 3.56 KB | jantoine |
Comments
Comment #1
jantoine commentedPatch attached!
Comment #2
jantoine commentedPatch that actually works!
Comment #3
drunken monkeyPlease remove the unnecessary README changes. Are there any real changes in there?
Apart from that, I'd generally be fine with the patch, makes sense to me. It'd just be a bit of a problem that people would have to update their configuration … That would be almost impossible to do in a update hook.
I'll have to think about it.
Comment #4
jantoine commentedThe changes to the README.txt file were specifically to the section that discusses the facet block feature which my code changes. It specifically references some '-facet_block' text which I removed and replaced with the display name. There are other edits where was simply replacing special quotes with regular quotes. I can revert these if desired.
Comment #5
jantoine commentedPer comment #36 from #1188562: [meta] Important project announcements, I am bumping this issue to keep it moving forward.
Comment #6
drunken monkeyPlease remove all changes not relevant to this issue from the README.txt.
Other than that, I guess we can commit this. We'd just need to clearly mention the need to re-configure facet displays in the release notes. (Please remind me if you see a new Search API release and there is no note about this. ;))
Comment #7
drunken monkeyAlso, I think just removing this line would work equally well, we set the same ID in the query class anyways.
Patch attached.
Comment #8
drunken monkeyCommitted. Thanks again!