Problem/Motivation
EntityBase::toUrl has $route_name = "entity.{$this->entityTypeId}." . str_replace(['-', 'drupal:'], ['_', ''], $rel); but GroupContentMenuRouteProvider uses add_link instead of add_menu_link for the add-menu-link relation. Same for edit.
Steps to reproduce
Try to use $gcm->toUrl('add-menu-link'), get exception.
Proposed resolution
Fix it. While at it, simplify relevant code in GroupContentMenuForm.
Remaining tasks
Do a follow up round in the test to use drupalGet($gcm->toUrl()) instead of hardwiring group and menu ids. (yes, drupalGet accepts Url objects, who knew? I sure didn't.)
Investigate whether the edit link in GroupContentMenuForm could be simplified.
User interface changes
API changes
Data model changes
Comments
Comment #2
ghost of drupal pastComment #3
ghost of drupal pastComment #4
heddnComment #5
heddnhttps://www.drupal.org/node/3312083 bites us :(
Comment #6
heddnComment #7
heddnComment #8
heddn