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

Charlie ChX Negyesi created an issue. See original summary.

ghost of drupal past’s picture

Issue summary: View changes
StatusFileSize
new2.95 KB
ghost of drupal past’s picture

Issue summary: View changes
heddn’s picture

StatusFileSize
new5.72 KB
new9.5 KB
heddn’s picture

heddn’s picture

StatusFileSize
new6.98 KB
new1.5 KB
heddn’s picture

heddn’s picture

Status: Needs review » Fixed

  • heddn committed d3b2847 on 8.x-1.x
    Issue #3311965 by heddn, Charlie ChX Negyesi: Route names do not mesh...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.