Referencing group_content throws invalid path on save

Created on 23 February 2024, 8 months ago

Problem/Motivation

When referencing Group Content entities (node's referenced within a group) with Linkit widget, unable to save the node due to following error:

The path 'entity:group_content/[ID]' is invalid.

Not entirely sure why exactly it throws the error, as looking at line 104 of LinkitHelper.php the group_content entity itself is loaded without any problem.

Maybe it has to do with internal path is not the usual internal:/[entity_type]/[id] but instead internal:/group/[group_id]/content/[id]. Although it appears to load the entity without any issues.

Steps to reproduce

Assumes that Groups and Linkit module installed and enabled, and that Groups and Group Content already exist on the site:

  1. Add a Link field on a content type
  2. Set field to use Linkit widget on Form Display
  3. Configure Linkit matchers for Group Content if required
  4. Add a Link field on a content type
  5. Create/Edit node
  6. Find group content in Link field
  7. Save node

Node edit form reloads with error message: The path 'entity:group_content/[ID]' is invalid.

Remaining tasks

Possibly identify when entity type's internal path is nested within another entity and adjust helper functions accordingly.

🐛 Bug report
Status

Active

Version

6.1

Component

Code

Created by

🇫🇷France waako Normandie

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024