New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception 'Route [aimeos_shop_account] not defined' when visiting shop page while logged in as admin #482
Comments
Aimeos aimeos_shop_profile route for /profile seems to be overwritten by a ProfileController. Is this your own implementation? Login is handled by Laravel Breeze, also for the shop. If you want to style it differently, you need to adapt the Laravel auth templates. |
I haven't implemented anything. It's just a new install following the instructions from https://github.com/aimeos/aimeos-laravel step by step. |
Unfortunately, Laravel Breeze adds a controller in app/Http/Controllers/ProfileController.php and a route for Route::middleware('auth')->group(function () {
Route::get('/profile', [ProfileController::class, 'edit'])->name('profile.edit');
Route::patch('/profile', [ProfileController::class, 'update'])->name('profile.update');
Route::delete('/profile', [ProfileController::class, 'destroy'])->name('profile.destroy');
}); |
That allows an admin to access the shop page, but kills the path for a regular user to open an account. Can't use the /register Breeze endpoint when removing these routes. |
Yes, new customers will be registered by default when they have finished the checkout (and they didn't opt out). |
Breeze redirects to Maybe it's enough to change that value. |
Sorry, I don't understand. You mean modify the breeze controller? What should that value be changed to? |
Can you try to change these routes to |
Hi, using aimeos Headless, Laravel Breeze and Inertia STOP acces to admin page. remove from web.php the code below: I changed to '/profile/me' but the issue remains unchanged. |
@MahmoudDevo: Creating a new project from aimeos/aimeos-headless including Laravel Breeze works without problems in our tests for 2022.10.x and dev-master. 2022.10.x: dev-master: Here are the registered routes for Aimeos dev-master:
403 THIS ACTION IS UNAUTHORIZED sounds like an authentication or session problem which must be caused by something else then the additonal |
@gitbuddy99 For Laravel 10.x, Breeze 1.20+ and Aimeos Laravel extension 2022.10.x, changing the Breeze routes in
to
solved the problem. |
Environment
Describe the bug
Just installed. initially worked as expected (routes /shop and /admin).
Then I started getting "Route [aimeos_shop_account] not defined."
After some digging, I found that when I visit the shop page from the same browser I'm logged as admin, the Profile link
airoute( 'aimeos_shop_account' )
throws an exception.If I visit the same page in a logged-out/private/incognito browser, the shop pages load fine.
Also, on the shop page the Login link points to /login, which goes to the Laravel/Breeze login page, not the shop one.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
open shop pages
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: