Fresh install of Drupal 11.3.0 rc-1.

Error: Route "entity.action_link.canonical" does not exist.

Action link config:

Action type: Boolean
Entity type: Content
Entity field: Promoted to front page
Link style: Javascript

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mortona2k created an issue. See original summary.

joachim’s picture

Status: Active » Postponed (maintainer needs more info)

I can't reproduce this, but my local is on 10.5.

Could you give the steps to reproduce -- when do you get the error?

And do you have a backtrace please?

mortona2k’s picture

Status: Postponed (maintainer needs more info) » Needs work

I can't reproduce this, but my local is on 10.5.

It's working for me on 10.5 too.

Could you give the steps to reproduce -- when do you get the error?

All I did was create a new action link with the above config. The error appears on save.

And do you have a backtrace please?

It doesn't look very helpful because it's all happening in the routing while trying to generate a link:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.action_link.canonical" does not exist. in Drupal\Core\Routing\RouteProvider->getRouteByName() (line 214 of core/lib/Drupal/Core/Routing/RouteProvider.php).

Drupal\Core\Routing\UrlGenerator->getRoute() (Line: 290)
Drupal\Core\Routing\UrlGenerator->generateFromRoute() (Line: 105)
Drupal\Core\Render\MetadataBubblingUrlGenerator->generateFromRoute() (Line: 773)
Drupal\Core\Url->toString() (Line: 176)
Drupal\Core\Utility\LinkGenerator->generate() (Line: 104)
Drupal\Core\Render\Element\Link::preRenderLink()
...

mortona2k’s picture

Status: Needs work » Needs review

This fixes it. I can't find a change record, but it seems like something changed with entity route handlers.
We don't need a canonical url, right?

  • joachim committed e7c3b966 on 1.0.x authored by mortona2k
    fix: #3562966 remove entity canonical link template which causes error...
joachim’s picture

Priority: Normal » Critical
Status: Needs review » Fixed

Thanks for figuring it out!

> We don't need a canonical url, right?

Probably not -- and there's a contrib module that crashes with them. Its confusing, as some core config entities have it and some don't!

Committed, and I'll make a new release as there are a couple of other fixes I made since the last alpha.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

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