CMS frontend error after upgrading from v4.16.2 to a newer version

System Information
  • Strapi Version: 4.17.0 … 4.24.0
  • Operating System: Frontend: Win/macOS
  • Database: MySQL
  • Node Version: v18.12.1
  • NPM Version: v8.19.2
  • Yarn Version:

I upgraded from Strapi v4.16.2 to a higher version, and since then, I can no longer access the content of the tables in the CMS because the frontend crashes every time.

Tested with: v4.17.0, v4.17.1, v.4.19.0, v4.20.0, v4.23.1, v4.24.0

When I click on an entry in any table, I receive the following error, and the page remains empty

With version 4.16.2, I didn’t have this issue.
This error occurs only in the CMS frontend, not in the backend.

Does anyone have an idea what’s causing the error or how I can fix it?

Ok, I have found out what is causing the error.

It is useRouteMatch

import { useRouteMatch, useHistory } from "react-router-dom"

export default function EntityLock() 
{
	const {
		params: { slug, id },
	} = useRouteMatch("/content-manager/collectionType/:slug/:id")

	...
}

The route has been changed from
“/content-manager/collectionType/:slug/:id”
to
“/content-manager/collection-types/:slug/:id”.