Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If there are already Group entities of a Group type and the menu content is enabled for this Group Type, creating Menus for already available Group entities of this type creates two identical duplicate records in the group_content_field_data. Any subsequent groups created adds just a normal single entry in the group_content_field_data as expected. So the bug actually is only when menus are created for already existing group entities.
Comment | File | Size | Author |
---|---|---|---|
#9 | 3144201-9.patch | 4.18 KB | edysmp |
| |||
#9 | interdiff-7-9.txt | 1.43 KB | edysmp |
#7 | interdiff-4-6.txt | 1.92 KB | edysmp |
#6 | 3144201-6.patch | 4 KB | edysmp |
| |||
#4 | 3144201-4.patch | 2.07 KB | edysmp |
|
Comments
Comment #2
DakwamineJust wanted to add that I have also had those duplicate entries for some reason. They refer to the same menu.
Comment #3
edysmpI was checking this and seems duplication is only happen when Group content menus are created through the UI (/group/{group_id}/menu/add) and not when are created automactically when creating the Group.
Comment #4
edysmpHere is a test that confirm the issue.
Comment #6
edysmpHere is a fix.
This was the problem, We were saving the group content, but Group module is doing that by default.
Deleting that, we not longer have access to the group content entity when generating a url for the group content menu entity.
Comment #7
edysmpAdding a interfdiff
Comment #8
heddnNit: If these are the same thing, then no need to have 2 distinct variables. Maybe just one
$arguments
is enough?Comment #9
edysmp#8: It makes sense.
Comment #11
heddnThanks for all your contributions, especially the tests.