luyadev / luya

LUYA is a scalable web framework and content management system with the goal to please developers, clients and users alike.
https://luya.io
MIT License
812 stars 207 forks source link

Language Switcher #1876

Closed nadar closed 5 years ago

nadar commented 5 years ago

The changes introduced in https://github.com/luyadev/luya/commit/85b7e132a34c214e5e4697b73890095902a0b69b (via #1855) breaks the ability to generate url rules without current module context.

This is used for the lang switcher: https://github.com/luyadev/luya-module-cms/blob/master/src/widgets/LangSwitcher.php#L201

nadar commented 5 years ago

@boehsermoe maybe an option for urlReplaceModule with $ensureControllerContext or something like this would fix the problem.

boehsermoe commented 5 years ago

@nadar maybe this could fix it https://github.com/luyadev/luya/pull/1877/commits/15bca4e67395022c1f170e3d65fbe8d31aae3468 We should write a unit test for this.

nadar commented 5 years ago

Yes i agree on this. https://github.com/luyadev/luya-module-cms/blob/master/tests/src/widgets/LangSwitcherTest.php