Error when enabling user profile on a custom filament panel
enabling
method on a custom panel provider throws the following error
23 Replies
What is the filament version?
Did it work without the CustomPage?
@Leandro Ferreira using the latest filament version
If I use the
profile()
method on the default AdminPanelProvider
it works. If I create a new Panel and then try to enable the profile
method on that. then I get this error
even passing no parameters to the profile
method on the new Panel Provider UserPanelProvider
yielded the same errorPlease post the code which defines both panels
added both panel providers
do you have middlewares, what is the content?
please confirm the filament version.. 3.?.?
There is a EditProfile page in the user provider...
@Leandro Ferreira I updated the Middleware and added the
EditProfile
class. The filament version is v3.1.29
I tried to use ->profile()
and ->profile(EditorProfile::class)
to see if one of the could be causing the issue
Try to remove EditProfile::class in the pages array and use
->profile()
here is my code updated as you requested
Could you share this project in the github?
its a closed source of a client project, don't think I can share, if you need any other details, I can share here. Will sharing the error page or flare help?
Flare
Route [filament.user.auth.profile] not defined. - The error occurred at https://tdba2.test/user/dashboard
i can try to reproduce this on a separate laravel project
php artisan route:list --name=profile
should show the filament.user.auth.profile
route. It is created with $panel->profile()
try to clear cache php artisan route:clear
or php artisan optimize:clear
if it doesn't work, remove the $panel->profile()
and try to add this route in the routes/web.php
php artisan route:list --name=profile
clearing cache doesn't help
removed $panel->profile()
and added the route you and that works
I am able to go to the Profile page
with this, it doesn't add the Edit Profile
to the User Menu
but enabling ->profile()
after adding the route throws the errorAn issue in the profile.show with your jetstream route
Same route, user/profile
so, I cannot use jetstream with filament?
I removed Jetstream completely and when I enable
profile
I don't get an error, but when I go to the Profile page, I get an error
I think you can use it but you need to customize the routes, filament or jetstream. Routes are unique
ok, I understand, I just wanted to be able to use some of the functionality that jetstream offers within Filament on custom filament pages
and jetstream offers options to customize/override the login and register page.
Solution
If you change the userprovider path from 'user' to another it should work
ah ok, so that is the issue. if I named it customer, then this would be fixed?
Should work
ok, that definitely helped. thank you for this. I will keep this in mind for the future. I appreciate the help
renaming the path from
user
to something else worked
now, I need to find a way to override the profile page to use the Jetstream components on a Custom Filament page
Changing the ->profile()
method to use a custom Filament Page, brings the error back
@Leandro Ferreira any way to customize adding menu items on the user menu?
nvm, found it
thanks for the help so far