Dispatcher has detected a cyclic routing causing stability problems

Dispatcher has detected a cyclic routing causing stability problems

modules.php $application->registerModules(array(

'testservice' => array(
    'className' => 'Modules\Modules\Testservice\Module',
    'path' => __DIR__ . '/../modules/testservice/Module.php'
)

));

beforeExecuteRoute(){ $dispatcher->forward(array( 'namespace' => 'Modules\Modules\TestService\Controllers', 'controller' => 'test', 'action' => 'index' ));

}

edited Oct '15

you didn't supply too many details to really understand what you're trying to do; but, from what you posted, you forward all pages to "test\index" which will also forward to "test\index" and so on, making it a cycling forwarding.



576

but still i am getting Dispatcher has detected a cyclic routing causing stability problems this page is not fowarded to my action

edited Oct '15

that's because you have an endless forward loop. if you go on "/some/random/page", according to your handler will forward to "test/index", but before executting "test/index" your application will get through beforeExecuteRoute again and forward you to "test/index" and so on, doing an endless forward loop.

Forward is basically a redirect done in just one request.



576

can u please give me a remedy to solve this one.