yii2-localeurls icon indicating copy to clipboard operation
yii2-localeurls copied to clipboard

Some issues with yii2-localeurls

Open justvladz opened this issue 3 years ago • 0 comments

Hello, my friend!

Firstly, I want to say thank you for this component. This is a really great thing! Such functionality must be included into framework and work out of the box. But I tried to use it in 2021 and unfortunately got some issues with Yii2 2.0.41.

  1. You should use Yii::trace instead of Yii::debug, since 2.0.14 is deprecated.
  2. Yii::$app->session[$this->languageSessionKey] is @property-read.
  3. I had sometimes random problems with redirects until I disabled cache of urlManager by setting 'cache' => false.
  4. When you foreach ignoreLanguageUrlPatterns you should use break in your loop after the first url found.
  5. When I use ignoreLanguageUrlPatterns it blocks debug toolbar. Pattern '#^debug/#' => '#^debug#' solved it, but I think this is a bug.
  6. Using option ignoreLanguageUrlPatterns application doesn't catch language from session, only resets to default language. It is not very convenient when used for the authorized user panel, because each user has his own language.

It'd be great if you find time to refactor these moments. Have a good one!

justvladz avatar May 02 '21 13:05 justvladz