route error on privacy page
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 error on privacy page
Hi.
I'm using Aimeos as a marketplace. Extension is enabled and in my file I have added:
to my routes.
In my in footer section I'm calling privacy route like this:
and shop page like:
Since these links are in footer, they both are called in every page, including privacy, shop page,...
on my homepage there's no error and shop_list page works fine.
but by clicking on privacy link, which opens, I get this error:
Laravel version: 6.2.12
Aimeos: 2020.10
php version: 7.4.9
Windows, wampp
Thanks in advance
I'm using Aimeos as a marketplace. Extension
Code: Select all
ai-sites
Code: Select all
config/shop.php
Code: Select all
[
'admin' => ['prefix' => 'admin', 'middleware' => ['web', 'verified']],
'jqadm' => ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth', 'verified']],
'jsonadm' => ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth', 'verified']],
'jsonapi' => ['prefix' => 'jsonapi/{site}', 'middleware' => ['web', 'api']],
'account' => ['prefix' => 'profile/{site}', 'middleware' => ['web', 'auth']],
'default' => ['prefix' => 'shop/{site}', 'middleware' => ['web']],
]
In my
Code: Select all
app.blade.php
Code: Select all
href="{{ route('aimeos_shop_privacy') }}"
Code: Select all
href="{{ route('aimeos_shop_list') }}"
on my homepage there's no error and shop_list page works fine.
but by clicking on privacy link, which opens
Code: Select all
localhost:8000/privacy
What should I do?Missing required parameters for [Route: aimeos_shop_list] [URI: shop/{site}]
Laravel version: 6.2.12
Aimeos: 2020.10
php version: 7.4.9
Windows, wampp
Thanks in advance
Aimeos version: ~2021.07
Laravel version: ^8.40
PHP: 7.4.9
Laravel version: ^8.40
PHP: 7.4.9
Re: route error on privacy page
The routes for terms and privacy doesn't require a site by default:
https://github.com/aimeos/aimeos-larave ... #L252-L266
But if you add a link to the Aimeos list page in the footer, it requires the current site because it's mandatory for the "aimeos_shop_list" route. At the terms and privacy page, you currently don't have a site parameter in your URL and you can either add
to the page configuration in the config/shop.php file to have page URLs like "/default/privacy" or add the site by using
Then, you have "/privacy" and the link to the Aimeos list page will be /shop/default/ for the default shop at the privacy page.
https://github.com/aimeos/aimeos-larave ... #L252-L266
But if you add a link to the Aimeos list page in the footer, it requires the current site because it's mandatory for the "aimeos_shop_list" route. At the terms and privacy page, you currently don't have a site parameter in your URL and you can either add
Code: Select all
'legal' => ['prefix' => '{site}'],
Code: Select all
route('aimeos_shop_list', ['site' => Route::input('site', 'default']))
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
Re: route error on privacy page
Thanks a lot.
I used the second approach since I wanted only privacy page for whole site.
But now I get this error when I enter an url that does not exists. Normally it must go to 404 page.
My 404 page also extends app.blade.php and therefor I have problems.
I get this error:
Call to a member function parameter() on null.
I do check if the route exists:
app.blade.php
I know it's actually Laravel related, but I would be so thankful if you could answer me.
I used the second approach since I wanted only privacy page for whole site.
But now I get this error when I enter an url that does not exists. Normally it must go to 404 page.
My 404 page also extends app.blade.php and therefor I have problems.
I get this error:
Call to a member function parameter() on null.
I do check if the route exists:
app.blade.php
Code: Select all
@if (Route::has('aimeos_shop_account'))
route('aimeos_shop_list', ['site' => Route::input('site', 'default')])
@else
url('/profile/default')
@endif
I know it's actually Laravel related, but I would be so thankful if you could answer me.
Aimeos version: ~2021.07
Laravel version: ^8.40
PHP: 7.4.9
Laravel version: ^8.40
PHP: 7.4.9
Re: route error on privacy page
Do you have a stack trace of the exception?
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