terminal42 / contao-easy_themes

Contao extension "easy_themes"
https://unmaintained.tech/
MIT License
13 stars 11 forks source link

Hotfix/assets initializitation #13

Closed dmolineus closed 9 years ago

dmolineus commented 9 years ago

There are some cases there the easy themes assets are not properly injected. This is caused by the "loadLanguageFile" hack. If a language file is loaded before the user got authenticated then the assets loading would fail.

A language file can be loaded before authenticated when a model find method is triggered before (e.g. in a initializeSystem hook). See Https://github.com/contao/core/commit/fa81a2cdde6a96100ab008b128d55f20a164027e.

I don't see any reasons to use the loadLanguageFile hack at all. Adding it to the constructor work as well (it's triggered by the loadDataContainer hook first).