Locale - new site creation
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!
Always add your Laravel, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
Spam and unrelated posts will be removed immediately!
-
- Posts: 6
- Joined: 06 Dec 2022, 10:44
Locale - new site creation
Hi,
I want to ask you guys, I just installed aimeos and try to learn about creating vendor from Admin > Locale > site
but i got this error
App \ Providers \ AppServiceProvider : 55
App\Providers\{closure}
View::composer('*', function ( $view ) {
$view->with( 'aimeossite', app( 'aimeos.context' )->get()->locale()->getSiteItem() );
Did anyone have this problem too?
did I do wrong in installation?
thanks for any inputs.
Mike
I want to ask you guys, I just installed aimeos and try to learn about creating vendor from Admin > Locale > site
but i got this error
App \ Providers \ AppServiceProvider : 55
App\Providers\{closure}
View::composer('*', function ( $view ) {
$view->with( 'aimeossite', app( 'aimeos.context' )->get()->locale()->getSiteItem() );
Did anyone have this problem too?
did I do wrong in installation?
thanks for any inputs.
Mike
Re: Locale - new site creation
Do you have more information about the problem, about your setup, what you did and a full stack trace?
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 6
- Joined: 06 Dec 2022, 10:44
Re: Locale - new site creation
thanks for the reply,
the setup is on Centos 7 machine and
Php Version 8.1.13
Laravel Version 9.44.0
Laravel Locale en
Laravel Config Cached false
App Debug true
do you have any sugestion on what is the best machine aimeos can run? should i use ubuntu like in your youtube demo videos?
thank you so much.
best,
mike
{
"id": 2,
"name": "mike@gmail.com",
"email": "mike@gmail.com",
"email_verified_at": "2022-12-16T00:00:00.000000Z",
"created_at": "2022-12-16T03:37:50.000000Z",
"updated_at": "2022-12-16T03:37:50.000000Z",
"siteid": "",
"superuser": 1,
"status": 1,
"company": "",
"vatid": "",
"salutation": "",
"title": "",
"firstname": "",
"lastname": "",
"address1": "",
"address2": "",
"address3": "",
"postal": "",
"city": "",
"state": "",
"langid": null,
"countryid": null,
"telephone": "",
"telefax": "",
"website": "",
"longitude": null,
"latitude": null,
"birthday": null,
"editor": "aimeos:account"
}
and the error on this part
public function boot()
{
Password::defaults(function () {
$rule = Password::min( 8 );
return $this->app->isProduction() ? $rule->mixedCase()->uncompromised() : $rule;
});
// for multi-locale setups
\Illuminate\Auth\Notifications\VerifyEmail::$createUrlCallback = function($notifiable) {
$time = Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60));
$params = [
'id' => $notifiable->getKey(),
'hash' => sha1($notifiable->getEmailForVerification()),
];
if( env( 'SHOP_MULTILOCALE' ) ) {
$params['locale'] = Request::route( 'locale', Request::input( 'locale', app()->getLocale() ) );
}
return URL::temporarySignedRoute('verification.verify', $time, $params);
};
View::composer('*', function ( $view ) {
$view->with( 'aimeossite', app( 'aimeos.context' )->get()->locale()->getSiteItem() );
});
}
}
the setup is on Centos 7 machine and
Php Version 8.1.13
Laravel Version 9.44.0
Laravel Locale en
Laravel Config Cached false
App Debug true
do you have any sugestion on what is the best machine aimeos can run? should i use ubuntu like in your youtube demo videos?
thank you so much.
best,
mike
{
"id": 2,
"name": "mike@gmail.com",
"email": "mike@gmail.com",
"email_verified_at": "2022-12-16T00:00:00.000000Z",
"created_at": "2022-12-16T03:37:50.000000Z",
"updated_at": "2022-12-16T03:37:50.000000Z",
"siteid": "",
"superuser": 1,
"status": 1,
"company": "",
"vatid": "",
"salutation": "",
"title": "",
"firstname": "",
"lastname": "",
"address1": "",
"address2": "",
"address3": "",
"postal": "",
"city": "",
"state": "",
"langid": null,
"countryid": null,
"telephone": "",
"telefax": "",
"website": "",
"longitude": null,
"latitude": null,
"birthday": null,
"editor": "aimeos:account"
}
and the error on this part
public function boot()
{
Password::defaults(function () {
$rule = Password::min( 8 );
return $this->app->isProduction() ? $rule->mixedCase()->uncompromised() : $rule;
});
// for multi-locale setups
\Illuminate\Auth\Notifications\VerifyEmail::$createUrlCallback = function($notifiable) {
$time = Carbon::now()->addMinutes(Config::get('auth.verification.expire', 60));
$params = [
'id' => $notifiable->getKey(),
'hash' => sha1($notifiable->getEmailForVerification()),
];
if( env( 'SHOP_MULTILOCALE' ) ) {
$params['locale'] = Request::route( 'locale', Request::input( 'locale', app()->getLocale() ) );
}
return URL::temporarySignedRoute('verification.verify', $time, $params);
};
View::composer('*', function ( $view ) {
$view->with( 'aimeossite', app( 'aimeos.context' )->get()->locale()->getSiteItem() );
});
}
}
Re: Locale - new site creation
Did you rename the "default" site or create a new site?
Can you record a screencast so we know what you are doing?
The Linux distribution is pretty irrelevant for Aimeos as long as PHP and its extensions are installed.
Can you record a screencast so we know what you are doing?
The Linux distribution is pretty irrelevant for Aimeos as long as PHP and its extensions are installed.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 6
- Joined: 06 Dec 2022, 10:44
Re: Locale - new site creation
Hi. thanks for the quick reply . these are the screen shots. it happens when in Default admin site and try to create new vendor ...thru locale and then site. and no I didn't try to change the default name
- Attachments
-
- Screen Shot 2022-12-23 at 09.44.24.png (164.89 KiB) Viewed 3809 times
-
- Screen Shot 2022-12-23 at 09.44.42.png (161.15 KiB) Viewed 3809 times
-
- Screen Shot 2022-12-23 at 09.44.15.png (168.44 KiB) Viewed 3809 times
-
- Screen Shot 2022-12-23 at 09.43.40.png (231.06 KiB) Viewed 3809 times
Re: Locale - new site creation
We've found the problem. First, you have to run:
Then, you need to adapt the ./app/Providers/AppServiceProvider.php file in your installation:
Code: Select all
composer req aimeos/aimeos-laravel:2022.10.x-dev
Code: Select all
View::composer('*', function ( $view ) {
try {
$view->with( 'aimeossite', app( 'aimeos.context' )->get()->locale()->getSiteItem() );
} catch( \Exception $e ) {
$view->with( 'aimeossite', \Aimeos\MShop::create( app( 'aimeos.context' )->get( false ), 'locale/site' )->create() );
}
});
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 6
- Joined: 06 Dec 2022, 10:44
Re: Locale - new site creation
Hi, i have run the composer require ...but i have this problem now.
[root@bridalview ~]# php composer require aimeos/aimeos-laravel:2022.10.x-dev
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
./composer.json has been updated
Running composer update aimeos/aimeos-laravel
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires aimeos/aimeos-laravel 2022.10.x-dev -> satisfiable by aimeos/aimeos-laravel[2022.10.x-dev].
- aimeos/aimeos-laravel 2022.10.x-dev requires laravel/framework ^9.0 -> found laravel/framework[v9.0.0, ..., v9.45.1] but the package is fixed to v8.83.27 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
what do i have to do now?
thanks.
[root@bridalview ~]# php composer require aimeos/aimeos-laravel:2022.10.x-dev
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
./composer.json has been updated
Running composer update aimeos/aimeos-laravel
Loading composer repositories with package information
Info from https://repo.packagist.org: #StandWithUkraine
Updating dependencies
Your requirements could not be resolved to an installable set of packages.
Problem 1
- Root composer.json requires aimeos/aimeos-laravel 2022.10.x-dev -> satisfiable by aimeos/aimeos-laravel[2022.10.x-dev].
- aimeos/aimeos-laravel 2022.10.x-dev requires laravel/framework ^9.0 -> found laravel/framework[v9.0.0, ..., v9.45.1] but the package is fixed to v8.83.27 (lock file version) by a partial update and that version does not match. Make sure you list it as an argument for the update command.
Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
Installation failed, reverting ./composer.json and ./composer.lock to their original content.
what do i have to do now?
thanks.
Re: Locale - new site creation
Seems like you have installed an old Laravel/Aimeos version, maybe due to an old PHP version installed at your machine. You need at least PHP 8.x to install Laravel 9 and Aimeos 2022.10. Check with:
Code: Select all
php -v
composer show
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star
-
- Posts: 6
- Joined: 06 Dec 2022, 10:44
Re: Locale - new site creation
Hi,
these are the result of the version of my apps
[root@bview ~]# php composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Composer version 2.4.4 2022-10-27 14:39:29
[root@bview gaea]# php artisan -V
Laravel Framework 9.44.0
[root@bview ~]# php --version
PHP 8.1.13 (cli) (built: Nov 22 2022 14:42:07) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
[root@bview ~]# mysql --version
mysql Ver 15.1 Distrib 10.4.27-MariaDB, for Linux (x86_64) using readline 5.1
[root@bview ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
i run "php composer show" and it does not result anything
i don't know how to check my aimeos version tho.
thank you for you helps .
Mike.
these are the result of the version of my apps
[root@bview ~]# php composer -V
Do not run Composer as root/super user! See https://getcomposer.org/root for details
Continue as root/super user [yes]? yes
Composer version 2.4.4 2022-10-27 14:39:29
[root@bview gaea]# php artisan -V
Laravel Framework 9.44.0
[root@bview ~]# php --version
PHP 8.1.13 (cli) (built: Nov 22 2022 14:42:07) (NTS gcc x86_64)
Copyright (c) The PHP Group
Zend Engine v4.1.13, Copyright (c) Zend Technologies
with Zend OPcache v8.1.13, Copyright (c), by Zend Technologies
[root@bview ~]# mysql --version
mysql Ver 15.1 Distrib 10.4.27-MariaDB, for Linux (x86_64) using readline 5.1
[root@bview ~]# cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
i run "php composer show" and it does not result anything
i don't know how to check my aimeos version tho.
thank you for you helps .
Mike.
Re: Locale - new site creation
Without "php" and in the aimeos application directory there should be a list of installed packages shown:
Code: Select all
cd /path/to/aimeos
composer show
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos, give us a star
If you like Aimeos, give us a star