Admin panel and change default site code error

Help for integrating the Laravel package
Forum rules
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Admin panel and change default site code error

Post by krzysiekp » 14 Oct 2022, 07:53

I changed default site code from "default" to "pl" and during logging to admin panel I receive error:

https://prnt.sc/AyKuQdolTNko

I have added in shop.php:

'mshop' => [
'locale' => [
'site' => 'pl', // used instead of "default"
]
],

User avatar
VirtualSpy
Advanced
Posts: 122
Joined: 05 Jul 2022, 07:55

Re: Admin panel and change default site code error

Post by VirtualSpy » 14 Oct 2022, 09:53

krzysiekp wrote: 14 Oct 2022, 07:53 I changed default site code from "default" to "pl" and during logging to admin panel I receive error:

https://prnt.sc/AyKuQdolTNko

I have added in shop.php:

'mshop' => [
'locale' => [
'site' => 'pl', // used instead of "default"
]
],
in your url there is showing site code "default" so it is showing error.

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Admin panel and change default site code error

Post by aimeos » 15 Oct 2022, 13:50

Maybe your configuration in your config/shop.php isn't at the correct place so still "default" is used while you've already renamed the site in the database. You have to change exactly this line:
https://github.com/aimeos/aimeos-larave ... p.php#L178

Make also sure that your configuration isn't cached by Laravel and use:

Code: Select all

php artisan optimize:clear
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

krzysiekp
Posts: 85
Joined: 05 Nov 2021, 16:19

Re: Admin panel and change default site code error

Post by krzysiekp » 26 Oct 2022, 13:20

There is still the error

User avatar
aimeos
Administrator
Posts: 7895
Joined: 01 Jan 1970, 00:00

Re: Admin panel and change default site code error

Post by aimeos » 27 Oct 2022, 14:55

Most likely, your admin user doesn't have "admin" or "editor" or "super" privileges or not valid site ID in his record in the users table ("1." for single site setups).

Relevant code:
https://github.com/aimeos/ai-admin-jqad ... hp#L46-L47
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, Image give us a star

Post Reply