Route [aimeos_home] not defined.
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!
Route [aimeos_home] not defined.
Hello there
I'm trying to test aimeos as a laravel package
I have followed the instructions in the documentation https://github.com/aimeos/aimeos-laravel, but when trying to access either /shop or /admin I always get this error: Route [aimeos_home] not defined.
When inspecting the routes, in fact, that route does not exist, I do not know if I have to use another version of this package, or that route comes in some other package of aimeos. (I have seen in the posts other similar errors of routes not defined and it will be solved by adding another package)
I am using:
PHP 8.0.19
Laravel v9.19.0
Docker version 20.10.12, build 20.10.12-0ubuntu4
aimeos/ai-admin-jqadm 2022.07.1
aimeos/ai-admin-jsonadm 2022.07.1
aimeos/ai-client-html 2022.07.1
aimeos/ai-client-jsonapi 2022.07.1
aimeos/ai-controller-frontend 2022.07.1
aimeos/ai-controller-jobs 2022.07.1
aimeos/ai-laravel 2022.07.1
aimeos/aimeos-base 2022.07.1
aimeos/aimeos-core 2022.07.2
aimeos/aimeos-laravel 2022.07.1
aimeos/macro 1.0.0
aimeos/map 3.1.0
aimeos/upscheme 0.8.2
Thanks in advance for your help
I'm trying to test aimeos as a laravel package
I have followed the instructions in the documentation https://github.com/aimeos/aimeos-laravel, but when trying to access either /shop or /admin I always get this error: Route [aimeos_home] not defined.
When inspecting the routes, in fact, that route does not exist, I do not know if I have to use another version of this package, or that route comes in some other package of aimeos. (I have seen in the posts other similar errors of routes not defined and it will be solved by adding another package)
I am using:
PHP 8.0.19
Laravel v9.19.0
Docker version 20.10.12, build 20.10.12-0ubuntu4
aimeos/ai-admin-jqadm 2022.07.1
aimeos/ai-admin-jsonadm 2022.07.1
aimeos/ai-client-html 2022.07.1
aimeos/ai-client-jsonapi 2022.07.1
aimeos/ai-controller-frontend 2022.07.1
aimeos/ai-controller-jobs 2022.07.1
aimeos/ai-laravel 2022.07.1
aimeos/aimeos-base 2022.07.1
aimeos/aimeos-core 2022.07.2
aimeos/aimeos-laravel 2022.07.1
aimeos/macro 1.0.0
aimeos/map 3.1.0
aimeos/upscheme 0.8.2
Thanks in advance for your help
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: Route [aimeos_home] not defined.
Adding this route, will solve the problem:
Code: Select all
Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')->name('aimeos_home');
Re: Route [aimeos_home] not defined.
I have the same problem. I have checked the routes that are defined in web.php and the route is already defined:
I cleared the route cache, however I still get the same error:
Missing required parameter for
Code: Select all
[b]Route::get('/', '\Aimeos_ShopController@homeAction')->name('aimeos_home');[/b]
Missing required parameter for
Code: Select all
[b][Route: aimeos_home] [URI: {locale}] [Missing parameter: locale].[/b]
Re: Route [aimeos_home] not defined.
If I set the value of the environment variable "SHOP_MULTILOCALE" to 0, the issue disappears.
Re: Route [aimeos_home] not defined.
the problem also appears in the checkout process:
Code: Select all
[b]Missing required parameter for [Route: aimeos_shop_count] [URI: locale/shop/count] [Missing parameter: locale][/b]
- ahmed31916
- Advanced
- Posts: 148
- Joined: 14 Apr 2022, 12:15
Re: Route [aimeos_home] not defined.
you need to configure your routes like this:peter69 wrote: ↑07 Jul 2022, 19:52 I cleared the route cache, however I still get the same error:
Missing required parameter forCode: Select all
[b][Route: aimeos_home] [URI: {locale}] [Missing parameter: locale].[/b]
Code: Select all
if( env( 'SHOP_MULTILOCALE' ) ) {
$locale = ['prefix' => '{locale}', 'where' => ['locale' => '[a-zA-Z]{2}(\_[a-zA-Z]{2})?']];
}
Route::group($locale ?? [], function() {
require __DIR__.'/auth.php';
Route::match(['GET', 'POST'], 'p/{path?}', '\Aimeos\Shop\Controller\PageController@indexAction')
->name('aimeos_page')->where( 'path', '.*' );
Route::get('/', '\Aimeos\Shop\Controller\CatalogController@homeAction')
->name('aimeos_home');
});
if( env( 'SHOP_MULTILOCALE' ) )
{
Route::get('/', function () {
return redirect(airoute('aimeos_home', ['locale' => app()->getLocale()]));
});
}
Re: Route [aimeos_home] not defined.
The "aimeos_home" route isn't defined by default, you have to add it yourself. See here:
https://github.com/aimeos/aimeos-laravel#frontend
To avoid that problem, it has been removed from the base.blade.php template and "/" is now used instead.
A new minor version (2022.07.2) has been released. Please run "composer up" to get the updated files.
https://github.com/aimeos/aimeos-laravel#frontend
To avoid that problem, it has been removed from the base.blade.php template and "/" is now used instead.
A new minor version (2022.07.2) has been released. Please run "composer up" to get the updated files.
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Route [aimeos_home] not defined.
Can you please post the output of "composer show" and your .env file (without the credentials)?peter69 wrote: ↑07 Jul 2022, 20:45 the problem also appears in the checkout process:
Code: Select all
[b]Missing required parameter for [Route: aimeos_shop_count] [URI: locale/shop/count] [Missing parameter: locale][/b]
Professional support and custom implementation are available at Aimeos.com
If you like Aimeos,
give us a star
If you like Aimeos,

Re: Route [aimeos_home] not defined.
Hello, with this version (2022.07.2), everything worked fine. Thanksaimeos wrote: ↑08 Jul 2022, 08:08 The "aimeos_home" route isn't defined by default, you have to add it yourself. See here:
https://github.com/aimeos/aimeos-laravel#frontend
To avoid that problem, it has been removed from the base.blade.php template and "/" is now used instead.
A new minor version (2022.07.2) has been released. Please run "composer up" to get the updated files.
Re: Route [aimeos_home] not defined.
Hello Sir,
I share with you the requested screenshots.
Now I only get an error "A non-recoverable error occurred" in the checkout process that does not allow me to finalize the purchase.
Regards,
I share with you the requested screenshots.
Now I only get an error "A non-recoverable error occurred" in the checkout process that does not allow me to finalize the purchase.
Regards,
- Attachments
-
- env.png (96.94 KiB) Viewed 6466 times
-
- composer show.png (217.08 KiB) Viewed 6466 times