- Issue created by @gwvoigt
- Status changed to Closed: duplicate
almost 2 years ago 4:57am 17 February 2023 - πΊπΈUnited States dww
Thanks for reporting the bug. However, it's already being addressed at π Add compatibility with Group v2 and v3 Fixed so let's focus our efforts there. Thanks!
- Status changed to Active
over 1 year ago 9:40pm 7 September 2023 - πΊπΈUnited States caesius
This still seems to be an issue when using Group version 2, despite the previous comment.
- πΊπΈUnited States caesius
The issue seems to be coming from this block of code.
https://git.drupalcode.org/project/entitygroupfield/-/blob/1db7be45e7df6...
- πΊπΈUnited States caesius
I've been trying to replicate the issue from scratch on a vanilla sandbox site without success.
To clarify, the specific issue I'm seeing is that editors in groups are getting the error "This entity (node: 1234) cannot be referenced" along with the expected "You are not allowed to remove this item" error, but there doesn't seem to be any issue with editing/saving nodes. It seems to only happen on nodes which are Unpublished.
I suppose this issue could be set to Closed or Postponed if I don't come up with steps to reproduce very soon.
- πΊπΈUnited States jascote
I don't have a fix, but I want to confirm that the error is still possible on 2.0.0--alpha1 even though the issue DWW mentions above is in that release.
Replicating the issue
Does anyone who is experiencing this issue have workflow enabled?For me, having workflow enabled and saving in any state other than published seems to be the issue. Once I move the state to published, that error goes away.
The confusing part is that even while I'm still getting the error on the node, if I go to the group's list of nodes, the new node displays in that list. And, as in the issue's screenshots, the group name is listed just above the error. I see the relationship entity in the db.
Without Workflow
I turned off workflow moderation for this content type, created a new node and saved as unpublished and I did NOT get the error. - πΊπΈUnited States caesius
It looks like adding a Workflow to the group content does the trick for reproducing the issue.
- πΊπΈUnited States caesius
I was able to replicate the issue on a fresh Drupal install, as demonstrated by the attached video. The error appears at 7:05.
- πΊπΈUnited States dww
Indeed, apologies that I misunderstood the bug at first and thought this was being fixed elsewhere. I wonder how much of it is what I proposed to clean up at #3152723: Hide aspects of the widgets that a user doesn't have permission to use β but never had time for.
That said, sounds like there's still an error here with workflow enabled, which we don't yet have any tests for.
@caesius, any chance you could take the steps from your video and turn them into an automated test? π Or maybe
@jascote? That'd be super helpful towards getting this fixed.Thanks!
-Derek