After many years using 3.x, I am updating to 5.x. Most things work but :
I am having a problem with plugin admin routing. My plugin is ‘Medias’.
This works : localhost:8888/cds-5/medias/dossiers/index
This does not : localhost:8888/cds-5/admin/medias/dossiers/index
Error message is : MediasController could not be found
Also this message : A route matching `array ( ‘plugin’ => NULL, ‘controller’ => ‘articles’, ‘action’ => ‘liste’, 0 => 2, ‘prefix’ => ‘admin’, ‘_ext’ => NULL, )` could not be found.
Routes file :
$routes->prefix(‘Admin’, function (RouteBuilder $routes) {
$routes->connect(‘/{controller}’, [‘action’ => ‘index’]);
$routes->connect(‘/{plugin}/{controller}’, [‘action’ => ‘index’]);
$routes->connect(‘/{controller}/{action}/‘, []);
$routes->connect(’/{plugin}/{controller}/{action}/’, );
$routes->fallbacks(DashedRoute::class);
});$routes->prefix(‘Admin’, function (RouteBuilder $routes) {
$routes->connect(‘/{controller}’, [‘action’ => ‘index’]);
$routes->connect(‘/{plugin}/{controller}’, [‘action’ => ‘index’]);
$routes->connect(‘/{controller}/{action}/‘, []);
$routes->connect(’/{plugin}/{controller}/{action}/’, );
$routes->fallbacks(DashedRoute::class);
});
Other problem =
A route matching `array ( ‘plugin’ => ‘Medias’, ‘prefix’ => ‘admin’, ‘controller’ => ‘Imgtags’, ‘action’ => ‘delete’, 0 => 12, ‘_ext’ => NULL, )` could not be found.
Thank you for helping me.