Drupal Version
10.3.2
Domain module version
2.0.x-dev
Expected Behavior
A user installs a module with an entity and needs to add the Available on Current Domain filter to a view for an entity type that is installed with that module. If I add field_domain_access and field_domain_all_affiliates, I want to use the Available on Current Domain filter.
Actual Behavior
Available on Current Domain filter is hard-coded to be only available for `node` entities.
Steps to reproduce
1. Enable a module: group, media, etc
2. Create a view for group or media
3. Try to add Available on Current Domain filter
4. Not available in filter list
Steps to resolve
1. In domain_access.module, in hook method domain_access_views_data_alter(), iterate entity types via entity type manager interface and add the Available on Current Domain for all available entity types.
2. In DomainAccessCurrentAllFilter.php, alter the query() method to check if the `table` is `field_domain_access`, and `explode` on `__` to get the base entity type and replace the hard-coded `node` value.
Issue fork domain-3476063
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
mably commentedA rebase is needed. Thanks.
Comment #5
mably commentedRebase done with a few fixes.
Comment #6
mably commentedCould we have some RTBC before merging please?
Comment #7
mably commentedComment #9
mably commented