Skip to content

Some issues with yii2-localeurls #167

@justvladz

Description

@justvladz

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions