Problem/Motivation

Trying to edit a search api page:
/admin/config/search/search-api-pages/search_api_global

I suddenly get the following error:

Symfony\Component\Routing\Exception\RouteNotFoundException: Route "entity.search_api_page.canonical" does not exist.

in Drupal 11.2.5

I'm quite sure some weeks ago it was still working. Any ideas?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

anybody created an issue. See original summary.

karlshea made their first commit to this issue’s fork.

karlshea’s picture

Status: Active » Needs review

I think Drupal 11 requires the canonical entity route to be defined.

anybody’s picture

Thanks @karlshea! Did you test this already? Does it fix the issue?
Should we add a simple test for the canonical route to ensure it won't break again?

karlshea’s picture

Yes, it fixed it for me.

Tests are already covering this, e.g. ViewModeTest::testDefaultViewModeAndOverrides() is checking for a 200 trying to access "admin/config/search/search-api-pages" and without this patch I'm getting a 500 there.

GitLab CI is not set up for this module so the tests aren't running.

anybody’s picture

Status: Needs review » Reviewed & tested by the community

Thanks @karlshea!

Maybe you'd like to apply as co-maintainer? I created #3572395: Code style cleanup, tugboat, gitlab CI & basic Tests

  • karlshea committed 20c400b7 on 8.x-1.x
    feat: #3554064 Symfony\Component\Routing\Exception\...
karlshea’s picture

Status: Reviewed & tested by the community » Fixed

Not a bad idea!

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.

anybody’s picture

@karlshea could you please tag a new release? The last tagged release is still broken!
Thanks!

karlshea’s picture

Done! I've been running -dev on a couple of sites for a month now, seems good to me.