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

use `getLangShortCode()` instead. Will be removed in version 3.0 #2151

Closed neoacevedo closed 2 years ago

neoacevedo commented 2 years ago

What steps will reproduce the problem?

Run the web app

What is the expected result?

Frontend web rendered.

What do you get instead? (A Screenshot can help us a lot!)

use getLangShortCode() instead. Will be removed in version 3.0

imagen

LUYA Check ouput (run this script and post the result: luyacheck.php)

1: [ini_get('short_open_tag')] '' 2: [ini_get('error_reporting')] '' 3: [phpversion()] '8.0.8' 4: [php_ini_loaded_file()] false 5: [php_sapi_name()] 'fpm-fcgi' 6: [isset($_SERVER['SERVER_SOFTWARE']) ? $_SERVER['SERVER_SOFTWARE'] : unknown] 'Apache/2.4.38 (Debian)'

Additional infos

Q A
LUYA Version
PHP Version 8.0
Platform Apache/PHP-FPM
Operating system Windows/Linux

In the file views/layouts/main.php at line 14: <?= Yii::$app->composition->language; ?> replace with <?= Yii::$app->composition->langShortCode; ?>.

nadar commented 2 years ago

which kickstarter have you installed? they are all up to date: https://github.com/luyadev/luya-kickstarter/blob/master/views/layouts/main.php#L14

neoacevedo commented 2 years ago

Being honest, I ran the command composer create-project luyadev/luya-kickstarter:^1.0 used in the general setup documentation.

nadar commented 2 years ago

Latest version of kickstarter is 1.1.8 and the above error is fixed already a long long time, so there must be something wrong while composer picked the version from your ^1.0 constraint, but that looks good at all. So it would be interesting which version have been installed by composer. could you share the lockfile?

neoacevedo commented 2 years ago

composer.lock.txt

By courious: why in both composer versions I'm getting the same luya version?

nadar commented 2 years ago

I am going to close this issue because:

If you think this is still important or there are more/new informations. Please reopen the issue and let us know.

If this is a problem or a feature you like to discuss, join our discussion: LUYA discussions. We try to keep our issue tracker as clean as possible in order to focus on active issues.