References are broken

Created on 29 January 2024, 5 months ago
Updated 19 April 2024, 2 months ago

Problem/Motivation

I believe that this change introduced in https://www.drupal.org/project/group_term/issues/3367570 Add Group Ids to the Taxonomy Terms Fixed are causing a couple of issues.

1. https://www.drupal.org/project/group/issues/3398778 🐛 Unknown column group_relationship_field_data.tid in 'on clause Needs review
This seems to be a regression caused by this. The fix they are working on is actually doing it's job preventing the fatal error on the term relations overview view, but this is just a workaround.

2. On top there is a regression with filtering out Terms on the "Add existing Term" page, where you have an autocomplete field for adding existing Terms to the group. This thing will now only show Terms that already belong to the group which makes it unsuable - therefor declaring this issue as a bug.

Steps to reproduce

Just install latest Version of Group and Group Term. Both issues should be reproduceable out of the box.

Proposed resolution

Undo the changes from https://www.drupal.org/project/group/issues/3398778 🐛 Unknown column group_relationship_field_data.tid in 'on clause Needs review
This issue can be solved by creating a view only showing the terms related to the group and using this as a selection handler setting. Eventually I will contribute a module providing a selection handler doing this out-of-the-box but we cannot do this on an API level without breaking the Add existing Terms feature.

🐛 Bug report
Status

RTBC

Version

4.1

Component

Code

Created by

🇩🇪Germany Hydra

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

Merge Requests

Comments & Activities

  • Issue created by @Hydra
  • Merge request !10#3417876 Revert query access. → (Open) created by Hydra
  • Status changed to Needs review 5 months ago
  • 🇩🇪Germany Hydra

    Removed the query access in the MR. This should re-add the functionality and solve the issue from https://www.drupal.org/project/group/issues/3398778 🐛 Unknown column group_relationship_field_data.tid in 'on clause Needs review

  • First commit to issue fork.
  • 🇨🇦Canada Jatin12nov Montreal

    I am currently facing the same issue.
    Can anyone come up with patch to solve the issue.

  • 🇩🇪Germany Hydra

    @Jatin12nov did you checkout the merge request? You can simply download a patch from there if you need one by click on the "code" link on the right top corner - its a little hidden, check out the docs: https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr...

  • 🇨🇦Canada Jatin12nov Montreal

    Thanks @hydra
    Yes, I did patch it. But it doesn't resolve the issue.
    I mean, it rremoves the error page, but not all the term child are visible to public. only the main term is hidden not its child terms.

  • 🇩🇪Germany Hydra

    This patch is not hiding anything - you should resolve this on the field widget. But I am not 100% sure if I can follow you. This issue is about making terms referencable again, not more. You might have an other issue here, but feel free to describe the exact steps to reproduce your issue, maybe someone is able to help you with that (probably even in an own issue?)

  • 🇨🇦Canada Jatin12nov Montreal

    Thanks @hydra, for quick response.

    Background of task:
    I am using group and group_term in forum website and all the forum tapics are dependent on forum container (Taxonomy).
    For example:
    All Discussion-
    General Discusion-
    Topic 1
    Topic 2
    Rest Discussion -
    Topic 1
    Topic 2
    Private Discussion - (This is taxonomy and Want to have this and its subcontent only available to group members)
    General Discusion-
    Topic 1
    Topic 2
    Rest Discussion -
    Topic 1
    Topic 2

    Steps to reproduce the issue:
    1. Create forum container and topics
    2. Create group type , example: "techteam"
    3. create group in group type, example: "team 1"
    4. Add members in team1
    5. Add term in team 1, which should only be avaiable to team 1 member (taxonomy and its forum topic inside)

    Issue:
    Unable to achieve step 5,

  • Status changed to RTBC 2 months ago
  • 🇩🇪Germany drupatz

    Considering the MR as ok, because it fixes/reverts an obvious bug, avoiding to get an overview of terms related to a group (at /group/%gid/terms).

    Issue from Jatin12nov seems to me like another Problem, not related to this issue.

  • 🇮🇹Italy kopeboy Mainland

    MR!12 removes the Unknown column group_relationship_field_data.tid error of the related issue, but /group/%/terms is still showing No terms available after having created them from the same page, hence are references still broken, or do we need to recreate the Group terms view in another issue?!

  • 🇩🇪Germany Hydra

    @kopeboy Yeah The view is also broken, but this does not relate to this issue here. Feel free to open a new issue for that, I could provide a working view as well.

  • 🇮🇹Italy kopeboy Mainland

    I did: 🐛 The Group Terms View is broken Active 🙏

Production build 0.69.0 2024