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.
To reproduce the bug:
- Add a menu
- Add some links
- Organize the links in hierarchy
- Try to edit the menu
When you try to edit the menu you got this error:
ArgumentCountError: Too few arguments to function Drupal\group_content_menu\Form\GroupContentMenuForm::buildOverviewTreeForm(), 2 passed in /var/www/html/web/modules/contrib/group_content_menu/src/Form/GroupContentMenuForm.php on line 346 and exactly 3 expected in Drupal\group_content_menu\Form\GroupContentMenuForm->buildOverviewTreeForm() (line 248 of modules/contrib/group_content_menu/src/Form/GroupContentMenuForm.php).
Comment | File | Size | Author |
---|---|---|---|
#15 | 3133868-15.patch | 2.57 KB | heddn |
| |||
#15 | 3133868-15_tests_only.patch | 2.12 KB | heddn |
|
Comments
Comment #2
smsow CreditAttribution: smsow commentedHere is the patch.
Comment #3
heddnComment #4
smsow CreditAttribution: smsow commentedComment #5
heddnThe
$group
parameter is needed. Need to figure out a way to make sure it is available.Comment #6
smsow CreditAttribution: smsow commentedComment #7
smsow CreditAttribution: smsow commentedComment #8
heddnIs there any chance that we could add to the test cases so we have test coverage for this?
GroupContentMenuTest::testGroupContentMenu
somewhere around the section that deals with// Add a menu link to the newly created menu, then edit it.
Comment #9
jastraat CreditAttribution: jastraat at Technivant commentedThe above patch fixed the same problem I had. I actually wrote the same fix before realizing someone could have saved me the work. :/
Comment #10
Yuri CreditAttribution: Yuri commentedI'm using Drupal 9.0.2 wtih php 7.3
When trying to create a menu item, this error appears
I applied the patch in #6 but that did not show any difference
The error message is slightly different but I think applies to the same issue.
Comment #11
gatorjoe CreditAttribution: gatorjoe as a volunteer commentedI confirm that the #6 patch resolved my issues.
Comment #12
heddn#10 I think is fixed in #3176082: Failing build on HEAD.
The original report should be NW for tests (which I'm working on ATM).
Comment #13
heddnI've added some tests.
Comment #15
heddnOK, the patch in #13 should have been uploaded to #3136494: When no menu has been created yet, node edit forms fail to render. I'm sure that will confused someone, but hopefully not too much. Here's a patch for _this_ issue.
Interdiff is the tests only patch.
Comment #19
heddn