Groups content form available tags

Created on 30 January 2024, 5 months ago
Updated 7 February 2024, 5 months ago

Problem/Motivation

I am trying to use this module, but I need to understand if next behavior is as it should:

- User1 is member of group1.
- User1 is member of group2.
- User1 adds Term1 in group1.
- User1 creates new content associated to group2. In autocomplete widget, Term1 is proposed, and it can be used.

Does this module restrict the available terms in content forms depending on the group membership? Or I need to add a view (based on the one included) to filter the available terms? Assuming this is true, there's no way to limit available tags when creating the content outside the group and attaching afterward, true?

πŸ’¬ Support request
Status

Needs review

Version

4.1

Component

Code

Created by

πŸ‡ͺπŸ‡ΈSpain aleix

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @aleix
  • πŸ‡ͺπŸ‡ΈSpain aleix

    As I said the workaround that I am testing is to use a new entity reference view, I cannot use the provided view as it's base table is group relationship rather than taxonomy term so it cannot be used as an entity reference eligible view.
    I am attaching the view, maybe it could be included in module, as it's as generic as it could be. Maybe later I could write some browser tests to assert it works as it should.

  • πŸ‡ͺπŸ‡ΈSpain aleix

    As I used this view as origin of available tags, I found that entityreference view could not set dynamically the argument.
    here it works setting the argument with an alter hook to finally provide :

    ...
     $form['field_tags']['widget'][0]['target_id']['#selection_settings']['view']['arguments'][0] = $groups[0]->id();
    ...
    
  • Status changed to Needs review 5 months ago
Production build 0.69.0 2024