Yii2: Module routes not working

Created on 5 Jul 2018  路  3Comments  路  Source: yiisoft/yii2

What steps will reproduce the problem?

add to routes
request /my-admin/blogs/
'<module:my-admin>' => '<module>', '<module:my-admin>/<controller>' => '<module>/<controller>', '<module:my-admin>/<controller>/<action>' => '<module>/<controller>/<action>', '<view:blog>/<url:[-\w]+>' => 'site/index', '<view:landing>/<url:[-\w]+>' => 'site/index', '/<url:[a-zA-Z0-9-/]+>' => 'site/index' //but work this rule

What is the expected result?

I need work with all requests in "site/index" but without modules requests

What do you get instead?

Can't get module by this routes

Additional info

| Q | A
| ---------------- | ---
| Yii version | 2.0.15.1.
| PHP version | 7.0.30-1+ubuntu18.04.1+deb.sury.org+1
| Operating system | Description: Ubuntu 18.04 LTS

question

Most helpful comment

@Quadrumkr I remember you asked about this in slack. I added tests to verify that this works: d0712e491

if something is not working that must be somehow specific to your application or config.

All 3 comments

Routes in module should be configured by bootstrapping.

Thank you for your question.
In order for this issue tracker to be effective, it should only contain bug reports and feature requests.

We advise you to use our community driven resources:

If you are confident that there is a bug in the framework, feel free to provide information on how to reproduce it. This issue will be closed for now.

_This is an automated comment, triggered by adding the label question._

@Quadrumkr I remember you asked about this in slack. I added tests to verify that this works: d0712e491

if something is not working that must be somehow specific to your application or config.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

chaintng picture chaintng  路  3Comments

skcn022 picture skcn022  路  3Comments

AstRonin picture AstRonin  路  3Comments

schmunk42 picture schmunk42  路  3Comments

psfpro picture psfpro  路  3Comments