- Issue created by @ericgsmith
- Merge request !5Issue #3463231: Plugin for tracking entities used in contextual filters from insert view → (Open) created by ericgsmith
- 🇳🇿New Zealand ericgsmith
I have pushed some code to a draft MR - this was mainly used to investigating if this was possible and not thoroughly tested.
I am likely to continue testing this - but would like to know first if this is something that maintainers would accept or if it should be included as a separate or sub module?
- 🇩🇪Germany a.dmitriiev
That is an interesting feature. As it is its own plugin under entity usage namespace, it doesn't "hurt". So I believe nothing prevents this to land in the module. Let me know if/when you want me to test something.
- 🇳🇿New Zealand ericgsmith
I'm picking this back up as a client wants to move forward with this functionality.
Having looked at Added EntityArgument and EntityReferenceArgument Views argument plugins → it seems for my use case the code can be simplified a lot if I only care about 10.3.x and above as I can now find the
target_entity_type_id
property in the argument definition instead of parsing the fields like previously.I have only given this a quick test with some views that have taxonomy term id contextual filters and it works as expected.
@a.dmitriiev I have not set this to needs review yet as I plan to tinker with it a bit more in the next few days.
- 🇳🇿New Zealand ericgsmith
Made some changes.
I found that while on a local site I had target_entity_type_id in config, when I tried testing on a fresh D11 install it wasn't there - it was only discoverable by loading the argument handler (which supplements the item with the views data - which specifies the target entity).
I then found that the term filters don't actually extend this anyway - so I've added a slightly non elegant check for the term filters.
I see there is currently not CI setup for the project - I can raise an issue for this as it would be good to get that setup before testing / reviewing this.