Incorrect Zend routes generated if same component used in different routes
Closed this issue · 0 comments
mdsina commented
Plesk version: 17.9.5
plesk-ext-sdk: 0.4.0
Actual result:
Routing doesn't work, Zend failed
Expected result:
Routes generated in different way
Additional info:
example extension.config.js:
module.exports = {
routes: [
{
path: '/settings',
component: 'domain/RemoteAccess',
title: 'Settings',
},
{
path: '/access',
component: 'domain/RemoteAccess',
title: 'Remote Access',
},
],
};
from index.php:
$router->addConfig(new \Zend_Config([
'Default' => [
'route' => ':controller/:action',
],
'domain/RemoteAccess' => [
'route' => '/settings',
'defaults' => ['controller' => 'index', 'action' => 'view'],
],
'domain/RemoteAccess' => [
'route' => '/access',
'defaults' => ['controller' => 'index', 'action' => 'view'],
],
]));