Tenant switcher in sidebar is not working.

I'm using Filament v3.2.131 The Tenant switch menu used to work before now it has suddenly stopped working. Is anyone else facing the same issue? I have attached screenshot of the JavaScript console.
No description
12 Replies
toeknee
toeknee4mo ago
please run: php artisan filament:about and confirm the exact version. As per the #✅┊rules you should be on the latest version.
roasted_tofu
roasted_tofuOP4mo ago
@toeknee I am using v3.2.131
toeknee
toeknee4mo ago
run: npm run build and then double check that user has tenants?
roasted_tofu
roasted_tofuOP4mo ago
The user has tenants. . Ideally i should be able to see other tenants the user is part of and create new tenant option on the dropdown. This used to work earlier. I think it is breaking in the latest version
roasted_tofu
roasted_tofuOP4mo ago
This is a different project that uses Filament v3.2.86 and this is working fine in that version.
No description
toeknee
toeknee4mo ago
IT is working for me here too can you check if you have any views published
roasted_tofu
roasted_tofuOP4mo ago
Yes, This is the result of php artisan filament:about
No description
toeknee
toeknee4mo ago
There you go then.... you likely have outdated views, remove the views and try again it is advised noted to publish the views
roasted_tofu
roasted_tofuOP4mo ago
I'm sorry, I did not have the views published initially, I just now published the views ust to try if it would fix the issue. Either way, same issue.
toeknee
toeknee4mo ago
Ok, definitely don't publish them. do you hvae a custom theme?
roasted_tofu
roasted_tofuOP4mo ago
Yes, But I think This has something to do with FilamentSpatieRolesPermissionsPlugin I'm debugging the roles to see what's causing the issue. I needed to override canView function on my RegisterTenant and EditTenantProfile.php files. Now, the menu is working. Thank you for your help @toeknee
toeknee
toeknee4mo ago
So there was not accessible tenants. Great to know

Did you find this page helpful?