- π³π±Netherlands Floris Vedder
Apparently this part isn't working anymore.
$this->getFieldsHelper()->filterForPropertyPath($item->getFields(), 'entity:node', 'field_domain_access');
So I solved that with a patch.
Basically by changing that to:$field = $item->getField('field_domain_access');
Keep in mind that the result is slightly different here we only get one field. For more info see the patch.
-- Alternative solution --
I also created an alternative solution.
Where I added an or condition in the filter itself.$or = $this->query->createConditionGroup('OR'); $or->addCondition($this->realField, $current_domain->id()); $or->addcondition('field_domain_all_affiliates', TRUE); $this->query->addConditionGroup($or);
In that way the data in the search api stays unmodified.
Downside of this solution is that it's always there and not configurable. - First commit to issue fork.
- @nikathone opened merge request.
- Status changed to Needs review
over 1 year ago 10:43pm 10 March 2023 - π¨π¦Canada nikathone Ontario
Created a merge request that ensure that the
Search API: Current domain
can be setup within a group in a view to work with other fields like in the attached screenshot.
- First commit to issue fork.
-
andileco β
committed 7ab84b19 on 1.0.x authored by
nikathone β
Issue #3311845 by nikathone, Floris Vedder: Send to all affiliates...
-
andileco β
committed 7ab84b19 on 1.0.x authored by
nikathone β
- Status changed to Fixed
over 1 year ago 10:57pm 10 March 2023 - πΊπΈUnited States andileco
Thank you @nikathone - confirming this works with your Views filter grouping.
Automatically closed - issue fixed for 2 weeks with no activity.